set rs=server.CreateObject("adodb.recordset")
strsql="select * from szwh where smallclass='"&smallclass&"'and year='"&myear&"'and month='"&mmonth&"'"
rs.open strsql,conn,1,3
if not rs.eof then
...
end if
...全文
31327打赏收藏
为什么我用not rs.eof判断是否有记录时,出错呢?
set rs=server.CreateObject("adodb.recordset") strsql="select * from szwh where smallclass='"&smallclass&"'and year='"&myear&"'and month='"&mmonth&"'" rs.open strsql,conn,1,3 if not rs.eof then ... end if
set rs = server.CreateObject("adodb.recordset")
strsql = "select * from szwh where smallclass='" & smallclass & "'and year='" & myear & "' and month='" & mmonth & "'"
rs.open strsql,conn,1,3
if not rs.eof then
...
end if