[odb-users] boost::exception

黄川 buptstehc at gmail.com
Sat Jan 4 02:47:21 EST 2014


Thanks, Boris. I have found the problem and it is not related to odb.
I have another question about odb. since i am using oracle, when i follow
the example, define the header file, generate code using odb compiler
command 'odb -d oracle --profile boost/date-time --generate-schema
 message.hxx', the generated sql file add table name and field name with
double quote like this:
CREATE TABLE "JupiterMessage" (
  "id" NUMBER(20) NOT NULL PRIMARY KEY,
  "name" VARCHAR2(512) NULL,
  "content" CLOB NOT NULL,
  "local" VARCHAR2(512) NULL,
  "remote" VARCHAR2(512) NULL,
  "create_time" VARCHAR2(512) NULL,
  "processed" NUMBER(1) DEFAULT 0 NOT NULL);
how can i remove ?  thanks!


2014/1/2 Boris Kolpackov <boris at codesynthesis.com>

> Hi,
>
> buptstehc at gmail.com writes:
>
> >   odb::transaction t (db_->begin()); //1
> >   db_->persist(m); //2
> >   t.commit();  //3
> >
> > and the exception throws at line 1. i have tried catch 'boost::system::
> > system_error', but fails.
>
> It cannot be a Boost exception since none of the above code uses Boost.
> Try catching odb::exception.
>
> Boris
>


More information about the odb-users mailing list