Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: C++ objects wrapped around the OCI
If you are using this in a MS environment, you'd rather use Oracle Objects for OLE, which is a DAO-style library.
Hth,
Sybrand Bakker, Oracle DBA
Jim Cain <xxxmexxx_at_jimcain.net> wrote in message
news:Pine.LNX.4.20.0004022313190.2668-100000_at_claudius.mgmt-inc.com...
> All,
>
> I've searched and searched and could not find a library of C++ objects
> wrapped around the OCI, so this weekend I created my own. I hope it wasn't
> a great waste of time, but if so, then so be it. I wanted to be able to
> avoid Pro*C, since it's mostly anti-OO, and I wanted to do stuff like
> this:
>
> Oracle::Connection db("user", "pass", "sid");
> db.connect();
> Oracle::Stmt* st = db.prepare("select col1, col2 from my_table");
> st->exec();
> while(st->fetch())
> cout << st->col(0)->str() << ", " << st->col(1)->str() << endl;
> st->close();
> db.disconnect();
>
> Have I missed something? I feel fairly certain that I have. Surely someone
> else has written something like this.
>
> If anyone can point me to similar code, I would greatly appreciate it. If
> not, let me know so I can share my work.
>
> Cheers,
> Jim
>
>
+-------------------+-------------------------+----------------------------+
> | Jim Cain | http://www.jimcain.net | Oracle Developer/DBA
> | Miami, FL USA | http://www.mgmt-inc.com | Linux System Administrator
> | me at jimcain.net | http://www.charlug.org | Apache/Zope Webmaster
|
>
+-------------------+-------------------------+----------------------------+