how to connect c++ program with database(Oracle)

shyam_oec's Avatar, Join Date: Nov 2007
Contributor
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's Avatar, Join Date: Aug 2004
Mentor
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's Avatar, Join Date: Jul 2004
Go4Expert Founder
Quote:
Originally Posted by xpi0t0s View Post
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
shyam_oec's Avatar, Join Date: Nov 2007
Contributor
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
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
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.