Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI Sample code in C++/C

Re: OCI Sample code in C++/C

From: Markus Schumann <go4shoe_at_hotmail.com>
Date: Mon, 11 Mar 2002 09:30:29 -0600
Message-ID: <u8pjch4jm1eufc@corp.supernews.com>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US