Solved

connectivity between c++ and oracle database

Posted on 2002-04-30
5
184 Views
Last Modified: 2012-05-04
how to connect oracle database through c++ programming.........want some sample code........
0
Comment
Question by:akmak
5 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 6982102
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.
0
 
LVL 6

Accepted Solution

by:
zebada earned 50 total points
ID: 6982712
0
 

Expert Comment

by:Bobert
ID: 6983478
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.
0
 
LVL 11

Expert Comment

by:griessh
ID: 7122236
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: http://www.experts-exchange.com/commspt/


PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!
======
Werner
0
 
LVL 6

Expert Comment

by:Mindphaser
ID: 7138146
Force accepted

** Mindphaser - Community Support Moderator **
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now