Problem solve Get help with specific problems with your technologies, process and projects.

Oracle back end with a C++ front end?

Can Oracle be used as a back end with C++ as front end? How?

Oracle can be used as a backed for many development language's applications, including C++ applications. You just need to get your C++ application connected to the database and issuing SQL statements against that database. Oracle has two different products for C++ applications. You can use either Oracle's precompiler, called Pro*C, or the Oracle C API Interface, called OCI.

Pro*C is very simple to use. You just place "EXEC SQL" statements in your C++ code. This statement will also contain the SQL operation you wish to perform. After your code is written, you run your code through the precompiler which changes those EXEC SQL statements to OCI calls. Then you compile your code. Pro*C makes it simple by removing all of the pesky OCI details. Unfortunately, after your program is run through the precompiler, the code can grow quite signficantly! So while it's easy to use, code growth can make it an unattractive solution.

OCI is much harder to use. You have to know more about the details of the code. But your code will compile right away and you won't see the code growth like Pro*C programs. And your code may be much more efficient with OCI.

So you have two options to use!!

For More Information

  • What do you think about this answer? E-mail the editors at editor@searchDatabase.com with your feedback.
  • The Best Oracle Web Links: tips, tutorials, scripts, and more.
  • Have an Oracle or SQL tip to offer your fellow DBAs and developers? The best tips submitted will receive a cool prize. Submit your tip today!
  • Ask your technical Oracle and SQL questions -- or help out your peers by answering them -- in our live discussion forums.
  • Ask the Experts yourself: Our SQL, database design, Oracle, SQL Server, DB2, metadata, object-oriented and data warehousing gurus are waiting to answer your toughest questions.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Start the conversation

Send me notifications when other members comment.

Please create a username to comment.