Re: dynamic ESQL/C question
Posted in 1998
Jonathan Leffler wrote: > > On Wed, 24 Jun 1998 apatnaik@aircom.com wrote: [SNIP] > > However, I don't know how to derive the number of bytes for > > the column field name. The examples go through fixed characters > > arrays that are used to receive the data. is there a way to figure > > out how long this is??? > > The column fields names were the subject of an extensive discussion earlier > this week under the heading 'ESQL/C and SQLDA' or vice versa. Please > exploit DejaNews to find that discussion -- it includes all the info on the > column names that you might need, and some to spare. Suffice to say, you > do not normally need to allocate the space yourself; it is allocated by ESQL/C > and you can use the column names immediately after the DESCRIBE. Jonathan, I think that the poster wanted to allocate space in his program into which to copy the column names for later use in reports, etc. He just needs to realize that Informix column names cannot exceed 18 characters so making them 'char names[MNAMES][19]' should suffice without any significant waste. Chill guy. Art S. Kagel