Re: c program against databases

From: Nils Myklebust <Nils.Myklebust_at_idg.no>
Date: 1997/03/14
Message-ID: <3328a444.53526487_at_gate.idg.no>#1/1


The ANSI/CLI standard where created to solve this mess. Informix CLI is available to support this. As far as I know it can connect to other databases than Informix. Also the OpenLink UDBC drivers implement the same standard (may not be 100% compatible?).
With these drivers you are able to connect to most databases with the usual caveat of different SQL implementations. Although these drivers automatically translates your SQL code to what each database expects you will not be able to utilise special functionality in each database without braking compatibility. You can execute such statements if you wish though, using the sql passthrough option. Of course the situation is even worse with the ESQL/C type of tools which do no translation for you. You will have to create special SQL for each database yourself.

NB! I do not know how well these tools work, as I haven't used them on Unix. They do seem worth testing though. Please report back your results if you do.

"Lan H. Tran" <lantran_at_ventera.com> wrote:

:hello,
:i would like to write a unix-based c program that would perform SELECT
:and INSERT against a database. i am very familiar with esql/c.
:however, i would like to productize this program and allow it to work
:with a variety of databases (Informix, Oracle, Sybase, DB2) on a variety
:of operating systems (variations of unix and NT, maybe).
:
:is the best way to write embedded sql c code (and recompile using
:esql/c, pro*c, etc...)? how standard is this? is there a good toolkit
:to help me out? is there a good book or website to learn more? how do
:app dev packages like IEF do it?
:
:it seems like i would have to buy alot of precompilers. for example, 4
:databases running on 5 platforms would require 20 (4 x 5) esql/c like
:compilers. is this true?
:
:i would appreciate any guidance.
:
:Lan H. Tran
:Ventera Corporation
:lantran_at_ventera.com

Nils.Myklebust_at_idg.no
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway My opinions are those of my company
The Informix FAQ is at http://www.iiug.org Received on Fri Mar 14 1997 - 00:00:00 CET

Original text of this message