Skip to Content.
Sympa Menu

freetds - Re: dblib problem null values to NTBSTRINGBIND char *

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>
  • Cc: Chris Eleveld <ihermit2 AT yahoo.com>
  • Subject: Re: dblib problem null values to NTBSTRINGBIND char *
  • Date: Thu, 14 Mar 2002 18:28:32 -0500


Do you have an indicator variable bound? I normally call dbnullbind so I'll know if it is null.

I don't have my standard with me, but does SQL allow a text column with an empty string? If so, then you really do need to check the indicator variable. If you can't have an empty string, then I don't see a problem with what you propose.


At 5:29 AM -0800 3/14/02, Chris Eleveld wrote:
I have an odd problem when I make a query that returns
a null in a column to a bound with NTBSTRINGBIND
program. The code is written in such a way that under
Sybase it would appear a null column results in the
char * being terminated as a zero length string. This
appears to be the db-lib behavior under Sybase. Under
FreeTDS however the bound variable just retains it's
last value. Does any one see a problem with adding an
else case in db-lib.c the function
buffer_transfer_bound_data() to the

--
__________________________________________________________________________
"They that can give up essential liberty
Mark J. Lilback to obtain a little temporary safety
<mark AT lilback.com> deserve neither liberty or safety."
http://www.lilback.com/ -- Benjamin Franklin




Archive powered by MHonArc 2.6.24.

Top of Page