一个sql语句没有查询到结果,
例如:select c1 from test where id=10(数据库中根本没有id=10的记录)
那么如何写判断程序呢,我是这样写的,不行
if rs.eof then
rs("c1")="空"
end if
response.write rs("c1")
判断不生效,写成if rs("c1")="" then,这样写也不行,请指教,谢谢!
...全文
1284打赏收藏
sql查询结果为空是,怎样写判断程序?谢谢
发现一个问题,请高手帮忙,谢谢! 一个sql语句没有查询到结果, 例如:select c1 from test where id=10(数据库中根本没有id=10的记录) 那么如何写判断程序呢,我是这样写的,不行 if rs.eof then rs("c1")="空" end if response.write rs("c1") 判断不生效,写成if rs("c1")="" then,这样写也不行,请指教,谢谢!