日期:2014-05-17  浏览次数:21000 次

大家给看看这个怎么不能判断sql字段为空!!!!(真是怪了,我用了所有方法!!!)
if   rs( "cpsms ")= "   "   or   rs( "cpsms ")= " "    
or   rs( "cpsms ")=null   or   IsEmpty(rs( "cpsms "))   then
“空”
else
"不空 "
end   if


------解决方案--------------------
这个问题我也想知道为什么?解决的办法是:
a=rs( "cpsms ")= " " '用一个变量去获取它的值
if a= " " or a=null then
'这样就可以判断了
end if
------解决方案--------------------
这个问题很麻烦只有rs( "cpsms ") is null才会判断到. rs( "cpsms ") is not null都不行
------解决方案--------------------
我想从SQL数据库里读出是空值的要怎么写。

sql= "select * from table where content= ' ' "

我想把这里内容是空的读出来。

这个content字,在数据库里显示NULL
------解决方案--------------------
rs是这样判断的
not rs.eof and not rs.bof
你如果要判断具体的一个结果应该把结果复制给一个变量
否则rs( "字段 ")是一个对象