写错了,正确的是:
if dv isnot nothing then
if dv.count>0 then
...
else
messagebox.show("数据为空")
end if
else
messagebox.show("查询失败")
end if
[Quote=引用 7 楼 的回复:]
vb.net:
if dv isnot nothing then
if dv.count>0 then
...
else
messagebox.show("数据为空")
end if
messagebox.show("查询失败")
end if
[/Quote]