freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: "Mark J. Lilback" <mark AT lilback.com>
- To: "TDS Development Group" <freetds AT franklin.oit.unc.edu>
- Subject: Re: dblib problem
- Date: Thu, 4 Apr 2002 16:28:36 -0500
Most APIs I've worked with function this way (I know I've seen ODBC drivers that don't clear them, and I think Oracle doesn't either). You're suppose to bind an indicator variable that you check for a NULL in before looking at the real value (or you can set the variables to zero/null).
A NULL value is not zero, but distinct from it. So setting it to zero really isn't the correct thing to do. It might be convenient, but it could easily lead to incorrect code because you aren't checking the indicator variables.
Since this is incompatible with the Sybase implementation, it might need fixing to maintain compatibility. But if NULL values are allowed, you reall should be checking the indicator variables.
Just my opinion, FWIW
At 1:36 PM -0700 4/4/02, Steven J. Backus wrote:
The actual value of spanish in the database is NULL, and when I use
the standard dblib that came with sybase, my spanish is set to
zero. Now, you might say "why not just initialize spanish to 0?"
But this problem is more dramatic. Whenever spanish is NULL, the
value is not set. So say spanish was 9, then the next dbnextrow
it's NULL. Since it's not set, spanish stays 9. I could reset it
to zero on every pass, but there's a lot of these variables, and a
few programs. Besides, this seems to be broken so maybe we should
fix it. As usual, TIA and all that.
--
__________________________________________________________________________
"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
-
dblib problem,
Steven J. Backus, 04/04/2002
- <Possible follow-up(s)>
- Re: dblib problem, Mark J. Lilback, 04/04/2002
- RE: dblib problem, Lowden, James K, 04/04/2002
- Re: dblib problem, Brian Bruns, 04/04/2002
- RE: dblib problem, Steven J. Backus, 04/04/2002
- RE: dblib problem, James K . Lowden, 04/04/2002
- RE: dblib problem, Brian Bruns, 04/04/2002
- RE: dblib problem, Steven J. Backus, 04/04/2002
Archive powered by MHonArc 2.6.24.