以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  在SQL中查到的值,如何判断为空?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=157291)

--  作者:304376480
--  发布时间:2020/10/11 10:42:00
--  在SQL中查到的值,如何判断为空?

老师您好!


用于执行一次返回多个值的命令,例如:

Dim cmd As new SQLCommand 
cmd
.CommandText = "Sel ect 部门,职务 fro m {员工} Where 姓名 = \'王伟\'"
cmd
.ConnectionName = "数据源名称"
Dim
 Values = cmd.ExecuteValues
If
 Values.Count > 0 Then
    
Output.show(Values("部门"))
    Output.show(Values("职务"))

End
 If


当某一列内容为空时怎么判断老是出错?


if Values("部门") isnot nothing then

msgbox(1)‘为什么总是进入

end if


if Values("部门") > "" then 会报错误

msgbox(1)

end if


--  作者:有点蓝
--  发布时间:2020/10/11 20:41:00
--  
if Values("部门").tostring <> nothing then