不行的,你这样吧: rs.open "select count(*) from table1",... if rs.eof and rs.bof then else if not isnull(rs(0)) then if rs(0)<>0 then '这里做不等于0的事 end if end if end if rs.close ...^_^
rs.open "select isnull(count(*),0) as 总数 from table1",... if rs("总数")=0 then '这里做等于0的事 end ifrs.close
rs.open "select * from table",cn if rs.recordcount<=0 then ................. endif
rs.open "select count(*) from table1",...
if rs.eof and rs.bof then
else
if not isnull(rs(0)) then
if rs(0)<>0 then
'这里做不等于0的事
end if
end if
end if
rs.close
...^_^
if rs("总数")=0 then
'这里做等于0的事
end ifrs.close
if rs.recordcount<=0 then
.................
endif
但我觉得有点麻烦,而且那么好的sql在那,用不着,真可惜。