Troubles with fetching NULL result
Mark J. Lilback
mark at lilback.com
Wed Apr 11 07:55:46 EDT 2001
>I work with freetds 0.51 to connect SyBase 11.9.2 from FreeBSD station.
>I have one trouble. when I try to get result with NULL field value in
>selectstatement, I receave after
>dbbind(dbproc,i+1,STRINGBIND,-1,(BYTE*) varbuff[i]) previos record's value
>
>May somebody help me in this case? How can I get NULL value? Ya, in sqsh
>it work perfectly!
You need to use dbnullbind to bind an indicator value for NULLs. I
also clear all my buffers at the top of the loop (actually just set
the first byte to zero) so that I don't see the previous value in the
debugger.
--
__________________________________________________________________________
"The best assumption to have
Mark J. Lilback is that any commonly held
<mark at lilback.com> belief is wrong." -- Ken Olsen,
http://www.lilback.com/ founder, Digital Equip. Corp.
More information about the FreeTDS
mailing list