Visual Basic RDO and SQL Server 6.5 null Problem 
Author Message
 Visual Basic RDO and SQL Server 6.5 null Problem

Hello,

An application that runs fine with SQL Server 6.0 uses Visual Basic 4.0 RDO
(RDO-Patch applied) to access the data.  Under SQL Server 6.5 (U.S. with
Service Pack 1) a select statement using a null in the where clause does
not work (select * from x where y = null).

Has anyone experienced this problem or knows of a solution?



Fri, 04 Jun 1999 03:00:00 GMT  
 Visual Basic RDO and SQL Server 6.5 null Problem

Hello,

An application that runs fine with SQL Server 6.0 uses Visual Basic 4.0 RDO
(RDO-Patch applied) to access the data.  Under SQL Server 6.5 (U.S. with
Service Pack 1) a select statement using a null in the where clause does
not work (select * from x where y = null).

Has anyone experienced this problem or knows of a solution?



Fri, 04 Jun 1999 03:00:00 GMT  
 Visual Basic RDO and SQL Server 6.5 null Problem

Should be: select * from x where y is null



Quote:
> Hello,

> An application that runs fine with SQL Server 6.0 uses Visual Basic 4.0
RDO
> etc.



Fri, 04 Jun 1999 03:00:00 GMT  
 Visual Basic RDO and SQL Server 6.5 null Problem

I thought you needed to use the "is null" construct:

select * from x where y is null;

Quote:

>Hello,
>An application that runs fine with SQL Server 6.0 uses Visual Basic 4.0 RDO
>(RDO-Patch applied) to access the data.  Under SQL Server 6.5 (U.S. with
>Service Pack 1) a select statement using a null in the where clause does
>not work (select * from x where y = null).
>Has anyone experienced this problem or knows of a solution?

Frank Thomas



Fri, 04 Jun 1999 03:00:00 GMT  
 Visual Basic RDO and SQL Server 6.5 null Problem


Quote:
>Hello,

>An application that runs fine with SQL Server 6.0 uses Visual Basic 4.0 RDO
>(RDO-Patch applied) to access the data.  Under SQL Server 6.5 (U.S. with
>Service Pack 1) a select statement using a null in the where clause does
>not work (select * from x where y = null).

>Has anyone experienced this problem or knows of a solution?

Yes. And there is a comprehensive article on this problem somewhere in
MS KB. In two words, you have to use the syntax of IS NULL, e.g.

select * from x where y is null

(or select * from x where NOT y IS null)

This is claimed to be a "more ANSI" syntax, and acquired habits and
practices of developers do not count... So, where do you want to go
today?



Sat, 05 Jun 1999 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Import text file in SQL Server 6.5 via SQL in Visual Basic

2. Import text file in SQL Server 6.5 via SQL in Visual Basic

3. Visual Basic & SQL server 6.5

4. Connection errors with Visual Basic 4 16-bit and SQL server 6.5 on a 3.11 platform

5. File DSN's and SQL Server 6.5 and RDO

6. VB4, SQL Server 6.5, RDO and ODBC

7. VB4 RDO Performance: SQL Server 6.0 vs 6.5

8. RDO and SQL Server 6.5

9. RDO and SQL Server 6.5

10. HELP!!! RDO and SQL Server 6.5

11. Null date, VB4 and SQL Server 6.5

 

 
Powered by phpBB® Forum Software