Skip to Content.
Sympa Menu

freetds - Re: Troubles with fetching NULL result

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Mark J. Lilback" <mark AT lilback.com>
  • To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
  • Subject: Re: Troubles with fetching NULL result
  • Date: Wed, 11 Apr 2001 07:55:46 -0400


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.




Archive powered by MHonArc 2.6.24.

Top of Page