Re: help with ESQL/C Indicator pointer
Posted in 1994
>From: a04423@giant.rsoft.bc.ca (George Long) >Subject: help with ESQL/C Indicator pointer >Date: 7 Mar 1994 00:35:30 GMT >X-Informix-List-Id: <news.5781> > I am constructing my own update statements and I cannot find anything > in the Informix documentation as to which indicator pointer I should be > using. > ... > I am currently setting sqlidata to point to a short, one per field, > the SQL UPDATE appears to function correctly yet I get an uninitialised > memory read from Purify 2.11 (a memory checker). The ESQL/C preprocessor > uses sqlidata, yet Mr. Laffer's (spelling ?) SQLCMD code uses sqlind, > which is correct ? Spelling! I think both are correct. Using sqlind was the Informix standard before there was another standard, but ANSI chose to standardise otherwise, so we support both mechanisms. You can use the indicator sqlind, or you can use the sqlidata and sqlitype and sqlilen fields. I use sqlind because it is marginally easier than coercing sqlidata to point to the short I want to use, setting sqlitype to CSHORTTYPE and sqlilen to SIZSMINT. My code should make sure that the unused field is a null pointer, but probably doesn't. Yours, Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>