Re: [Q] Handle Informix + Oracle DB from same C++-program?

From: Luc Paré <lpa_at_ambrasoft.lu>
Date: 1996/04/10
Message-ID: <316B8E3C.1B37_at_ambrasoft.lu>#1/1


Almut Herzog wrote:
> =
 

> Hi,
> =
 

> I am investigating the possibility to have *one* C(++)-program that can
> insert, update, select... in both an Informix and Oracle database.
> =
 

> I wonder if this is possible at all as both vendors make use of the
> sqlca structure. The program would have to pass through Pro*C++ as well
> as ESQLC (this does not sound feasible, does it?).
> I do not *have* to be able to join between Informix and Oracle tables,
> but maybe in a year or so I want that, too.
> =
 

> Would ODBC help here? Remember, I need a C(++)-program. Which products
> can be of use (except Oracle-Gateways-to-Informix which is far too
> expensive)?
> TIA
> =
 

> --
> Almut Herzog
> SECTRA Secure Transmission AB e-mail: al-her_at_sectra.se
> Teknikringen 2 voice: ++46 13 235221
> 583 30 Linkoping fax: ++46 13 212185
> SWEDEN
Long time ago I have met the same kind of problem =

in an Unix C program that had to access several types of DBMS (Oracle and informix for instance). =

This program had to provide the same API for all DBMS accessed. The API was VERY simple such as:

    Execute SQL query
    Open SQL cursor
    Fetch SQL cursor
    Describe SQL cursor
    Close SQL cursor

The architecture we set up was the following:  One module contains non SQL calls that calls

    either Informix or Oracle functions according     to a switch. This module should hide the     DBMS specific functionnalities.
 A second module should access Informix (ESQL precompiled)  The third module should access Oracle (Pro*C precompiled)

With this architecture you may add new DBMS's in your program with no problem.

Luc Par=E9 Received on Wed Apr 10 1996 - 00:00:00 CEST

Original text of this message