PRB: Use 'IS NULL' in SQL Queries when Calling from Visual InterDev (231647)
The information in this article applies to:
- Microsoft Visual InterDev 1.0
- Microsoft Visual InterDev 6.0
This article was previously published under Q231647 SYMPTOMS
When you run a SQL Query from Visual InterDev that has "= NULL", the data returned may be different than the data returned from other tools, such as the ISQL/W tool that comes with SQL Server 6.5.
CAUSE
If the "Use ANSI nulls, paddings and warnings." check box is selected in your ODBC DSN settings, you will see this behavior. According to ANSI standards, the "= NULL" syntax is FALSE. Executing the following query against the pubs database in SQL Server from Visual InterDev returns no records:
"SELECT * FROM discounts WHERE stor_id = NULL"
RESOLUTION
There are two ways to work around this problem:
STATUS
This behavior is by design.
Modification Type: | Major | Last Reviewed: | 5/8/2002 |
---|
Keywords: | kbDatabase kbDSupport kbprb KB231647 |
---|
|