Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI Sample code in C++/C
Hello,
I have a little class ... that allows you to the following thing:
#include "../db_ora/db.h"
int main(int argc, char *argv[])
{
DBConnection db;
db.open("scott/tiger");
DBItr myIterator ( &db, "SELECT ename,job FROM emp");
while(myIterator.next())
{
cout << "name: " << myIterator[0] << endl; cout << "name: " << myIterator["ename"] << endl;
cout << "job: " << myIterator[1] << endl; cout << "job: " << myIterator["job"] << endl; }
return 1;
}
The stuff is derived from
http://codeguru.earthweb.com/mfc_database/Osql10.shtml
If you need the stuff on windows use the above URL ... for UNIX just send me an e-mail.
Markus.
"Normal Man" <coowboy_at_yahoo.com> wrote in message
news:bc9ee28b.0203052321.7c956974_at_posting.google.com...
> I'm trying to write an application in C++ which would connect to a
> Oracle 8i, perform SELECTS and UPDATES. Does anyone have a sample code
> which would enable me to do this. Any pointers would be appreciated
> too.
Received on Mon Mar 11 2002 - 09:30:29 CST