Re: c program against databases
Date: 1997/03/16
Message-ID: <332bff71.1750196_at_gate.idg.no>#1/1
David Williams <djw_at_smooth1.demon.co.uk> wrote:
:In article <33287792.3C6D_at_ventera.com>, "Lan H. Tran"
Nils.Myklebust_at_idg.no
:<lantran_at_ventera.com> writes
:>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?
:>
:
: Someone where I work has written ESQL/C code which can also be
: compiled against Oracle Pro/C using #define ORACLE / #INFORMIX
: and #ifdef's. It was relatively easy.
:
: You could probably write a small libary to handle
:
: 1. Connect to database.
: 2. Disconnect from database.
: 3. Run insert/update/delete against database - these can be stored
: in C strings and prepared - they return a status code.
:
: 2. Run select against database
:
: Can be prepared relatively easily.
:
: 3. Fetch values that are selected.
:
: Not tried (and the hardest bit) since you need to handle variable
: numbers of return values.
:
:
: Conclusion: ESQL/C is the way to go for Oracle/Informix (and Ingres as
: I have written Ingres ESQL/C. Sybase has it's own toolkit so it maybe
: harder to write for.
:
:
:
:>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
:--
:David Williams
NM Data AS, P.O.Box 9090 Gronland, N-0133 Oslo, Norway
The Informix FAQ is at http://www.iiug.org
Received on Sun Mar 16 1997 - 00:00:00 CET