Q

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.

This was first published in March 2002

Dig deeper on Oracle database design and architecture

Pro+

Features

Enjoy the benefits of Pro+ membership, learn more and join.

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.

0 comments

Oldest 

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to:

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide

SearchDataCenter

SearchContentManagement

SearchFinancialApplications

Close