Re: unsigned int usage as a host variable in ESQL/C
Posted in 1998
>Using 7.24.UC1 ESQL/C, I get that error. Using ClientSDK 2.10, the code compiles >correctly. I guess the answer is to upgrade... > >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 > Since upgrading can be a bit extreme, either declare another variable as an unsigned int and assign it through a cast, or simply cast the value whenever you reference it. Whether or not it is signed or unsigned, it is still the same bit settings. Just make sure that even though it is stored as an int, that it is always treated as an unsigned int. EXEC SQL BEGIN DECLARE SECTION; int sInt; EXEC SQL END DECLARE SECTION; unsigned int uInt; .. fetch your values ... uInt = (unsigned int) sInt; Cheers, Bryan Hughes Healtheon bryan@healtheon.com ============================================================= What if the HOKEY POKEY is what IT really is all about? =============================================================