Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   how to connect c++ program with database(Oracle) (http://www.go4expert.com/forums/connect-cpp-program-database-oracle-t20705/)

shyam_oec 20Jan2010 10:27

how to connect c++ program with database(Oracle)
 
hi,
i am using Oracle 9i release 2, and Windows XP OS.For developing C++ application i am using eclipse IDE with MinGW toolkit. I want to know how to connect a c++ program to a database like Oracle. Database connectivity is quite easy in java or .net, but it seems quite difficult here. Any help?
Thanks.

xpi0t0s 20Jan2010 15:36

Re: how to connect c++ program with database(Oracle)
 
Have a look at the Oracle Call Interface (OCI).
Assuming of course "a database like Oracle" means simply "Oracle". OCI won't work for other databases; it's Oracle-specific.

shabbir 20Jan2010 16:15

Re: how to connect c++ program with database(Oracle)
 
Quote:

Originally Posted by xpi0t0s (Post 63145)
Have a look at the Oracle Call Interface (OCI).
Assuming of course "a database like Oracle" means simply "Oracle". OCI won't work for other databases; it's Oracle-specific.

After a long break. Good to see you back :D

shyam_oec 20Jan2010 20:10

Re: how to connect c++ program with database(Oracle)
 
hi,
I browsed through sufficient sited that have information about oracle call interface. From oracle's site i downloaded occi for gcc compiler.but i am feeling myself completely helpless regarding how to implement connectivity in c++ .
please explain me if possible step by step (not necessarily in one day) how to retrieve data from oracle through my c++ program.
Thanks:disappoin

xpi0t0s 20Jan2010 20:56

Re: how to connect c++ program with database(Oracle)
 
Yes, you will get confused if you confuse technologies. I said OC(one C)I, not OCC(two C's)I. These are not the same, and I don't recommend OCC(two C's)I.

If you download the Companion disk (10g) or Examples disk (11g), this includes OCI examples that you can try out and study. These are good for getting you started. Also have a good read of the Oracle OCI Programmer's Guide.


All times are GMT +5.5. The time now is 12:30.