数据库采用的是SQL Server 2000其中有许多字段允许为空,即在数据库中显示
1<null>,可是用ADO进行查询时,用rs.fields("ID")="NULL",rs.fields("ID")="<null>",rs.fields("ID") is "NULL",rs.fields("ID") is NULL,rs.fields("ID")="",作为判断条件都得不到满足条件的纪录,众位兄长告诉我这个判断条件应该怎么写,很急呀!
2\---------------------------------------------------------------
3
4IsNull(rs.fields("id"))
5
6或者rs.fields("ID")=NULL,
7\---------------------------------------------------------------
8
9if isnull(rs("id")) then
10..................
11end if
12\---------------------------------------------------------------
13
14isnull(ID)
15\---------------------------------------------------------------
16
17if isnull(rs.fields("ID")) then
18response.write "the ID is null"
19else
20response.write "the ID is not null"
21end if</null></null>