RE: [odb-users] ODB compiler for oracle, double qoutes SQL?statements

Magnus Granqvist magnus.granqvist at
Tue Nov 20 08:30:46 EST 2012

Thanks, it works.


-----Original Message-----
From: Boris Kolpackov [mailto:boris at] 
Sent: den 20 november 2012 14:49
To: Magnus Granqvist
Cc: odb-users at
Subject: Re: [odb-users] ODB compiler for oracle, double qoutes SQL?statements

Hi Magnus,

Magnus Granqvist <magnus.granqvist at> writes:

> But I think I see why this is happening now, the table must be created 
> with quotes to support the SQL.

Yes, in other words, the tables were created without quoting and Oracle uppercased them.

> This could be a problem developing for existing production databases 
> that is not created with qoutes
> CREATE TABLE "dagsmproduct" (
>   "oidval" RAW(16),
>   "msisdn" VARCHAR2(512) NOT NULL PRIMARY KEY);

In this case it is probably best to assign custom table/column names that correspond exactly to the existing names. This way, also, you can use more descriptive C++ names that follow your naming convention.
For example:

#pragma db object table("DAGSMPRODUCT")
class DagSmProduct

  #pragma db type("RAW(16)") column("OIDVAL")
  char oid_val[16];

  #pragma db id column("MSISDN")
  std::string ms_isdn;


More information about the odb-users mailing list