
Null behavior change from ODBC 3.0 to 3.6
Quote:
> Hi folks,
> we're using VB5, SQL Server 6.5 and RDO 2.0;
just updated some clients from
Quote:
> ODBC 3.0 to ODBC 3.6.
> We noticed that our apps do not return
correct/complete data anymore. The
Quote:
> reason is a changed behavior on cheking for
Null values.
> The affected SQL statements got sth. like
SELECT ...... WHERE col1=Null...
Quote:
> If I change the WHERE clause to use the IS Null
operator instead, then the
Quote:
> data is returned correctly.
> We did NOT change any settings on the SQL
Server.
> Does anyone know the reason for this?
> Is there any solution or workaround other than
rewriting all my SQL
Quote:
> statements?
> Thanks for your help.
> Andreas Roth (Selters, Germany)
I'm not sure why you'd be getting differences
when changing the ODBC drivers. However, based
upon SQL documentation, which is consistent with
my experience, col1=Null should always yield
FALSE regardless of your ODBC driver. Null is
undefined so any comparison to a value that is
undefined will always yield FALSE. Using IS NULL
or IS NOT NULL is the way to go.
Stan Tierney (Phoenix, AZ)
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.