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? You can safely reuse sqlda structures, I do it all of the time. I even have one utility that describes a SELECT and uses that sqlda to build an INSERT statement that points to the just FETCHED data. Art S. Kagel