RE: Checking NULL value...
Posted in 2000
I always used an INDICATOR for the column to find if it was NULL.
Information on indicators should be in your esqlc manual
Will
>===== Original Message From "Pacbell News" <hughesb@pacbell.net> =====
>I am hoping someone can help me. My ESQL/C code is having difficulty
>distiquishing between a column with a NULL value and a column = '\\0' (or "")
>using a sqlda structure after a FETCH ... USING DESCRIPTOR ...
>
>I have correctly DESCRIBED the statement into the sqlda structure and
>allocated the memory accordingly. I have the following table:
>
>CREATE TABLE test ( name char(16), value char(16) );>
>INSERT INTO test ( name, value ) values ( "test", "" );
>INSERT INTO test ( name ) values ( "test1" );>
>If I use dbaccess and do a SELECT * FROM test WHERE value IS NULL, the row
>with name = "test1" is returned.
>
>In my ESQL/C code, immediately before the fetch sqlvar[...].sqlind is NULL
>as well as immediately after for both rows. When I use the Informix library
>call risnull(), it returns TRUE for both records.
>
>Why is dbaccess able to determine that one row is NULL and the other is a
>single character string with a NULL value?
>
>Bryan Hughes
>Shutterfly.com
>
>--
>
>------------------------------------------------------------
>"A doctor can bury his mistakes but an architect can only
>advise his client to plant vines." -- Frank Lloyd Wright
------------------------------------------------------------
This e-mail has been sent to you courtesy of OperaMail, as a free service from
Opera Software, makers of the award-winning Web Browser, Opera. Visit us at
http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free e-mail
account is waiting at: http://www.operamail.com/
------------------------------------------------------------