Re: Anyone using Oracle with C++?

From: Craig McIntire - Unisys <mcintire_at_reston.unisysgsg.com>
Date: 1995/09/06
Message-ID: <DEHn24.JAI_at_reston2.reston.unisysgsg.com>#1/1


In article <42i35b$74g_at_su102w.ess.harris.com>, "Barbara Furtney..." <bfurtney> writes:
|> Is there anyone out there using Oracle with C++? Are you using the Pro C++ or
|> a C interface? What's your experience?
|>
|> Searching for someone with "real" experience,
|> Barbara
|>
We have built an application using Oracle and C++. For our initial approach, we developed C functions encapsulating the Pro C code. This set of C functions was run through Pro C and then compiled with a C compiler. On the C++ side, we created a Oracle Wrap class providing a 1-to-1 mapping to the C functions containing the Pro C code. The Oracle Wrap class declared the C functions as extern "C" and each member function invoked its corresponding C function to provide the database access. For example, our application declared an instance of Oracle_Wrap and then invoked the member function Oracle_Wrap::FRM_Open (char * userid, char * passwd) to open a connection to the database. The FRM_Open() member function invoked the C function FRM_sql_open (char* userid, char* passwd) containing the Pro C EXEC SQL statements required to connect to the database.

This strategy worked well for our application. We are now in the process of rewriting the Oracle_Wrap class to use DBTOOLS.h++ developed by Rogue Wave which provides a C++ interface to Oracle. So far, this is proving to be a much better approach.

  • craig
Received on Wed Sep 06 1995 - 00:00:00 CEST

Original text of this message