Re: ESQL/C: Using $struct with null fields
Posted in 1998
On Mon, 14 Dec 1998, Randy Galbraith wrote: > Is there any problems with doing this? Yes. > $struct tagFOO_TABLE > { > long field1; > string field2[20]; > } FOO_TABLE; > > $struct tagNULL_FOO_TABLE > { > int field1; > int field2; > } nullFOO_TABLE; > > ... later on in the code ... > > $fetch cursor_id into > $FOO_TABLE:nullFOO_TABLE; > > I'm very new to ESQL/C and this is the first time I've tried to using a > C structure to hold null indicators. It appears to work, but I'm > wondering if there is any caveats I should be aware of. Basically I'm > looking for someone to give my a warm fuzzy feeling about doing this :-) I wouldn't expect this to work. In fact, with ESQL/C 7.24.UC1, I get the message: Warning -33046: Indicator cannot be used with records. Yours, Jonathan Leffler (jleffler@informix.com) #include <witticism.h> Guardian of DBD::Informix v0.60 -- http://www.perl.com/CPAN Informix IDN for D4GL & Linux -- http://www.informix.com/idn