以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  判断空值问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=131501)

--  作者:gudao123456
--  发布时间:2019/2/27 21:29:00
--  判断空值问题
Dim Values = cmd.ExecuteValues
dim sxnd as string 
if   Values (“上学年度”)isnull then
sxnd="未上学”
else 
sxnd=values("上学年度")
endif

但执行起来,提示 “DBNULL无法转换为string 类型”
如何判断 Values (“上学年度”) 是否为空值?
谢谢!
[此贴子已经被作者于2019/2/27 21:36:44编辑过]

--  作者:有点甜
--  发布时间:2019/2/27 21:39:00
--  
if Values("上学年度").ToString = Nothing then
--  作者:gudao123456
--  发布时间:2019/2/27 21:40:00
--  
谢谢!