VB中如何查询SQL Sever中某表字段为空的记录
编号:QA001637
建立日期: 1999年9月1日 最后修改日期:1999年9月1日
所属类别:
daisy:
vb6
NT Workstation 4.0
VB中如何查询SQL Sever6.5中某表字段为空的记录?我用sql server 6.5的Isql查询(时间值为空):select * from tab1 where cxsj=Null
是可以的,但一到VB中,用ADO的Rs.open "select * from tab1 where cxsj=Null",cn,...却查出为空结果集。
回答:
我觉得可以这样写:
dim rs as new adodb.recordset
Rs.open "select * from tab1 where cxsj Is Null"
在 vb6 +SQL 7 下 运行肯定是没问题的。
此问题由Knofler回答。
| |
|
|
| |
|
|