Re: ESQL/C vs. SQLDA
Posted in 1998
steve53@earthlink.net wrote: > > Hi, > > I've got an ESQL/C application (Solaris, Informix SE v7.2). There are > cases where I need to rebuild the SELECT statments with the same > fields list but a different query. In an effort to wring out a bit > more performance, I decided that I could avoid the DESCRIBE > overhead and reuse the fields clause SQLDA since the fields list > never changed. This worked well until I discovered that Informix > creates an SQLDA that contains pointers (i.e. sqlname) to data outside > the SQLDA structure allocated by Informix. > > Did I miss something? If so, would someone to point me at the > documentation that says I am required to do a DESCRIBE after > 'every' PREPARE? > > Thanks > > Steven. Hi, be carefull when using the old fashioned DESCRIBE method. There is no need to do another DESCRIBE after a PREPARE. But Informix tells you, that you must free the memory by yourself. So never forget to free the memory Informix allocated. Don't use the EXEC SQL FREE statement, use the C-function free((char*)sqldapointer) Bye Stefan Weideneder