dao: dim sc as recordset if sc.RecordCount =0 then '没有数据 endif ado: dim sc as ado.recordset if sc.eof and sc.bof then '没有数据 end if
sql = "select * from table" set rs = Server.CreateObject("Adodb.RecordSet") rs.CursorLocation = adUseClient rs.open sql,conn,3 if rs.recordcount<1 then '空 else while not rs.eof ' ' ' rs.MoveNext wend rs.close end if
dim sc as recordset
if sc.RecordCount =0 then
'没有数据
endif
ado:
dim sc as ado.recordset
if sc.eof and sc.bof then
'没有数据
end if
set rs = Server.CreateObject("Adodb.RecordSet")
rs.CursorLocation = adUseClient
rs.open sql,conn,3
if rs.recordcount<1 then
'空
else
while not rs.eof
'
'
'
rs.MoveNext
wend
rs.close
end if