Re: Freeing sqlda from DESCRIBE INTO statement
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL
I've been running into the same problem on NT/VC++6.0sp2 using the same configuration below and when I call my debug version of free (Microsoft's _free_dbg) it complains that the pointer that I'm freeing (the sqlda) hasn't been allocated from within my own heap. I can only find one example Informix esql program that uses free on the sqlda (demo3.ec). All the other examples don't appear to be free'ing the sqlda directly. We have code on UNIX that uses free and behaves correctly on all platforms that we support, but the WinNT debug heap seems to be a major hang up. Does anyone know how to deallocate this resource on exit on NT? Thanks, Brand In article <37A91225.3CB7@earthlink.net>, jleffler@earthlink.net wrote: > hhac@my-deja.com wrote: > > > > I am writing a program in Visual C++ on NT that uses dynamic SQL using > > ESQL to connect to an Informix 7.3 database. > > > > I am using the DESCRIBE INTO statement to have ESQL allocate the sqlda > > structure for me and would like to know how to deallocate this > > structure. I tried using free(describe_ptr) but that didn't work. It > > gave me a heap error. <Snip> > This is emphatically wrong; it is not releasing the space > which you described. It is either releasing some other SQL DESCRIPTOR > (as distinct from sqlda structure), or it is failing altogether (far > more likely). Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.