if isnull(rs.fields("字段")) = true then
这个字段是null值
else
这个字段不为null
end if
----------------
if len(trim(rs("note")))<1 then
ds=""
else
ds=rs("note")
end if
---------------
if rs.fields("字段") is null then
这个字段是null值
else
这个字段不为null
end if
--------------
这个字段是null值
else
这个字段不为null
end if
----------------
if len(trim(rs("note")))<1 then
ds=""
else
ds=rs("note")
end if
---------------
if rs.fields("字段") is null then
这个字段是null值
else
这个字段不为null
end if
--------------
本文介绍了几种在编程中判断字段是否为空的常见方法,包括使用if语句结合isnull和trim函数来检查变量是否为空字符串或null值。这些方法适用于数据库查询结果的处理。
403

被折叠的 条评论
为什么被折叠?



