巫师3熊剑在哪:ADODB.Recordset (0x800A0BCD)

来源:百度文库 编辑:高考问答 时间:2024/04/28 00:08:12
ADODB.Recordset (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.Mappath("mood#.mdb")
conn.Open "driver={Microsoft Access Driver (*.mdb)};dbq=" & DBPath
Set rs= Server.CreateObject("ADODB.Recordset")
sql="select * from check where class="&request("classid")
rs.open sql,conn,3,2

do while not rs.eof or rs.bof
if ("admin")= session("admin") then

end if
rs.movenext
loop

response.write "<script>alert('这个项目您已经投过了,感谢参与!!!');</script>"
call show()
response.end

rs.close
set rs=nothing
请问是怎么回事啊,都快烦死了

也许楼上的回答运行起来没错,但实际有错
应该是:
do while not rs.eof and not rs.bof
是and 不是or。意思是:只有不是记录的结尾并且也不是记录的开头时才循环

do while not rs.eof or rs.bof
写错了吧!
do while not rs.eof or not rs.bof