ESQL question
Posted in 2000
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
Hi, I'd like to know if there is a way via a C program or a script to query a current Informix database and get a list of all schema tables and fields. Then I'd like to compare this list against several files that contain "create" statements to determine what database version I am using. Can dynamic ESQL/C be used to get a list of all the tables that exist for a current database and all the fields for each of the tables? Note that I am not interested in the # of records for each table, just the schema info. Thanks for any info or pointers!! Email lora@ragingbull.com Sent via Deja.com http://www.deja.com/ Before you buy.
Look at the source to my myschema utility which is contained in the
package utils2_ak. The mainline code deals with tables and columns to
emulate dbschema. It is completely written in C and ESQL/C. You
basically just have to query systables joined to syscolumns by tabid
ORDER by tabid, colno.
Art S. Kagel
lora@ragingbull.com wrote:
>
> Hi,
> I'd like to know if there is a way via a C program
> or a script to query a current Informix database and
> get a list of all schema tables and fields. Then I'd like
> to compare this list against several files that contain "create"
> statements to determine what database version I am using.
>
> Can dynamic ESQL/C be used to get a list of all the
> tables that exist for a current database and all the fields for
> each of the tables? Note that I am not interested in the
> # of records for each table, just the schema info.
>
> Thanks for any info or pointers!!
> Email lora@ragingbull.com
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.