Re: Informix-4gl Reports - Question re: Accessing Table Data
Posted in 1997
Davy P wrote: > > I would like to use Informix-4GL to create a printed report. I would like > to write the report so it is able to read the systables and syscolumns > tables to figure out what tables and fields are defined and then SELECT > FROM those tables and fields. In my experience I've always needed to > specifically indicate the table name and I haven't been able to figure out > how to select data from a dynamically defined table name. > > Any suggestions? In 4GL, you can prepare any select string you like, including dynamic table and column names (see 'PREPARE'). When you fetch the rows into variables though, you need to know how many and preferably what datatypes those variables are. If the # of columns and datatypes are also variable, then you might consider ESQL/C. Good Luck, Douglas Wilson