> I have three database and many tables..
> In my project, the access program to database is required.
> this program has general functions.
> that is, arbitrary databases, arbitrary tables, and arbitrary fields.
> example)
> DB_access( database name, table name , field name, constraint , ...)
> please help me.
> If you know the method to make this function, tell me that..
> i use c language and informix dbms.
You need an interface library. Informix has two available, ESQL/C and
CLI. ESQL/C, or Embedded SQL in C, includes a precompiler that allows
one to embed SQL statements directly into one's C code, thus:
EXEC SQL SELECT col1, col2, col3 FROM table1 WHERE col4 = :hostvar;
The CLI product is an implementation of the ODBC interface for Informix
database servers and is similar to the interface that you suggest.
Contact your Informix sales rep. if you do not have one of these.
Art S. Kagel