Link to home
Start Free TrialLog in
Avatar of akmak
akmak

asked on

connectivity between c++ and oracle database

how to connect oracle database through c++ programming.........want some sample code........
Avatar of jhance
jhance

Oracle has available a developers toolkit if you want to make a "native" interface from C++ to Oracle.  

But most developers choose to use the Oracle ODBC driver.

Check with your Oracle sales rep. for the developer product.

You probably got the ODBC driver with your Oracle software.
ASKER CERTIFIED SOLUTION
Avatar of zebada
zebada

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Depending on what you're trying to do, there are simpler options than OCI.  The Pro C/C++ precompiler is an option that lets you embed SQL in your code, then run it through a program Oracle provides that creates all the OCI code necessary to retrieve that data from the database.

There are also a few OCI wrappers that greatly simplify the task of accessing the database for your typical data retrievals.  Three of them are found at the bottom of this page: http://www.orafaq.com/faqoci.htm.

I recently switched from using straight OCI to the Oracle Template Library (OTL) package mentioned.  I've found it to greatly simplify your typical database accesses.  The page includes docs and over a hundred examples.  

Depending on exactly what you're trying to do, give one of these libraries a try.
Dear akmak

I think you forgot this question. I will ask Community Support to close it unless you finalize it within 7 days. You can always request to keep this question open. But remember, experts can only help you if you provide feedback to their questions.
Unless there is objection or further activity,  I will suggest to accept

     "zebada"

comment(s) as an answer.

If you think your question was not answered at all, you can explain here why you want to do this and post a request in Community support (please include this link) to refund your points. The link to the Community Support area is: https://www.experts-exchange.com/commspt/


PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
Force accepted

** Mindphaser - Community Support Moderator **