Skip to Content.
Sympa Menu

freetds - dblib problem null values to NTBSTRINGBIND char *

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Chris Eleveld <ihermit2 AT yahoo.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: dblib problem null values to NTBSTRINGBIND char *
  • Date: Thu, 14 Mar 2002 05:29:46 -0800 (PST)


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

if (curcol->varaddr &&
!tds_get_null(resinfo->current_row,i))

something along the lines of:

} else if (curcol->varaddr &&
(curcol->column_bindtype ==
NTBSTRINGBIND)) {
curcol->varaddr[0]='

__________________________________________________
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
http://sports.yahoo.com/




Archive powered by MHonArc 2.6.24.

Top of Page