sending null back to sql server 6.5 
Author Message
 sending null back to sql server 6.5

i am sending a query to a table located in sql server
using Visual Basic. the query checks whether a field is
null or not.

for example: table_example
field_1       field_2
abc           2
(null)        3

i want to send a query "select * from table_example where
field_1 = null". But when I send the query I get error. So
I set a String variable(str) to NULL and tried "select *
from table_example where field_1 = '" & str & "' ". But
this also doesn't work. Anyone know how I can check if a
field contains a null. Thanks.

G. Rush



Wed, 17 Mar 2004 08:27:15 GMT  
 sending null back to sql server 6.5

Quote:
> i am sending a query to a table located in sql server
> using visual basic. the query checks whether a field is
> null or not.

> for example: table_example
> field_1       field_2
> abc           2
> (null)        3

SELECT * FROM table_example
WHERE field_1 IS NULL

Adelle.

__________________________________________________
Impress your friends.  Become an SQL guru.
http://www.sql-guru.com



Wed, 17 Mar 2004 10:51:18 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Visual Basic RDO and SQL Server 6.5 null Problem

2. Null date, VB4 and SQL Server 6.5

3. VB4 and SQL Server 6.5, Null values

4. Sending a image to SQL Server 6.5

5. Access97/SQL 6.5 NULLs and Pass-through queries

6. New Transact-SQL Debugger for Microsoft SQL Server 6.5/7.0

7. Converting data to show zeros for null data SQL 6.5 CRY 6.0

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

9. SQL Debugger for Microsoft SQL Server 7.0 and 6.5

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

11. Sending Null to SQL Server

12. Send Update Statement to SQl 6.5

 

 
Powered by phpBB® Forum Software