注册 登录
编程论坛 ASP技术论坛

数据字段没赋值之前

发布于 2008-08-15 18:08, 607 次点击
数据字段AA没赋值之前

if rs("aa")="" then 这句话没效(用=或<>它都是false)

然后我用typename(rs("aa")),结果是null

我又用 if rs("aa")=null  结果是false

if typename(rs("aa"))="Null" 结果是true

看来以后insert数据时空值用''写入或设默认值为空字串,这样就可以用 if rs("aa")="" then了

这样也行 if rs("aa") & "" = "" then
1 回复
#2
tianyu1232008-08-16 11:37
用isNull()来判断

if isNull(rs("aa")) then
1