关于ASP的错误类型:(0x80020009)发生意外。
发布网友
发布时间:2024-10-24 02:31
我来回答
共3个回答
热心网友
时间:2024-11-08 10:05
for i=0 to 2
Response.write "强:<a href='bbs_view.asp?tid=" & rs1("id") & "&hk="&hk&"'>" & rs1("name") & "</a><br/>"
'rs1.movenext 此处用上就出现:错误类型:(0x80020009)发生意外
next
改为
do while not rs1.eof
Response.write "强:<a href='bbs_view.asp?tid=" & rs1("id") & "&hk="&hk&"'>" & rs1("name") & "</a><br/>"
rs1.movenext
loop
热心网友
时间:2024-11-08 10:07
改成这个看看,估计你移动的时候rs1已经到底了
for i=0 to 2
Response.write "强:<a href='bbs_view.asp?tid=" & rs1("id") & "&hk="&hk&"'>" & rs1("name") & "</a><br/>"
rs1.movenext
if not rs1.eof then
next
else
EXIT FOR
end if
热心网友
时间:2024-11-08 10:05
<%
set rs1=Server.CreateObject("ADODB.Recordset")
sql="select * from bbstz where bbsid<11 and rc>999 order by tm desc"
rs1.open sql,conn,1,3
if not rs1.eof then
Response.write "===论坛强贴===<br/>"
for i=0 to 2
Response.write "强:<a href='bbs_view.asp?tid=" & rs1("id") & "&hk="&hk&"'>" & rs1("name") & "</a><br/>"
'rs1.movenext 此处用上就出现:错误类型:(0x80020009)发生意外
next
end if
rs1.close
set rs1=nothing
%>
改为:
<%
set rs1=Server.CreateObject("ADODB.Recordset")
sql="select * from bbstz where bbsid<11 and rc>999 order by tm desc"
rs1.open sql,conn,1,3
if not rs1.eof then
Response.write "===论坛强贴===<br/>"
dim i
while not i <3
Response.write "强:<a href='bbs_view.asp?tid=" & rs1("id") & "&hk="&hk&"'>" & rs1("name") & "</a><br/>"
i=i+1
wend
end if
rs1.close
set rs1=nothing
%>