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
--------------
本文介绍了在编程中如何判断数据库字段是否为空值或空白字符串的方法。通过三种不同的条件语句实现,帮助开发者正确处理数据,避免因空值引发的运行错误。
404

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



