在线等,高分求教

cyh2000177 2004-01-24 03:24:52
错误 '80020009'
发生意外。

/cyh/jw/xuti_1.asp,行228


这是我的代码!
<%
xt.movefirst
if not xt.eof then
p=1
for p =1 to sl_p
if xt("tmlx") = "3" then
%>
<tr>
<td width="40" height="25"> <div align="center"><font size="2"><%= p %></font></div></td>
<td height="25"><font size="2"><%= xt("tmnr") %></font></td>
</tr>
<%
else
do while xt("tmlx")<>"3"
xt.movenext
if xt.eof then
exit do
else
end if
loop
if not xt.eof then
%>
<tr>
<td width="40" height="25"> <div align="center"><font size="2"><%= p %></font></div></td>
<td height="25"><font size="2"><%= xt("tmnr") %></font></td>
</tr>
<%
else
response.write("记录只有这些了?请见谅!")
end if
end if
if xt.eof then
exit for
else
xt.movenext
end if
next
else
%>
<tr>
<td width="400" height="25"> <div align="center"><font color="#990000" size="2">由于本站正在建设之中,判断题目没有那些齐全,请见谅!</font></div></td>
</tr>
<%
end if
%>
...全文
42 10 打赏 收藏 转发到动态 举报
写回复
用AI写文章
10 条回复
切换为时间正序
请发表友善的回复…
发表回复
cyh2000177 2004-01-24
  • 打赏
  • 举报
回复
谢谢!
pzlk 2004-01-24
  • 打赏
  • 举报
回复
搞没搞错啊
把整段代码贴出来啊,谁晓得哪句是228
我估计是include里面的东东
cyh2000177 2004-01-24
  • 打赏
  • 举报
回复
if not xt.eof then 是228行


cyh2000177 2004-01-24
  • 打赏
  • 举报
回复
if not xt.eof then 是228
纪俊 2004-01-24
  • 打赏
  • 举报
回复
建议你再仔细思考一下你程序中的思路
if xt("tmlx") = "3" then
%>
<tr>
<td width="40" height="25"> <div align="center"><font size="2"><%= p %></font></div></td>
<td height="25"><font size="2"><%= xt("tmnr") %></font></td>
</tr>
<%
else
do while xt("tmlx")<>"3"
xt.movenext
if xt.eof then
exit do
else
end if
loop
if not xt.eof then
'这里边上边就是xt("tmlx") = "3"的情况,下边是在xt("tmlx") <> "3"情况下游标向下走,而后边的两个if xt.eof 都好像有些啰嗦...
还有你的228行是哪里呢?你的Recordset对象的调用过程也需要检查下才能解决你的问题。
纪俊 2004-01-24
  • 打赏
  • 举报
回复
先给你提个意见,你的程序循环嵌套太啰嗦,比如说
if xt.eof then

else
end if
完全可以写成if xt.eof then exit do就行
floatdust 2004-01-24
  • 打赏
  • 举报
回复
你用的是不是:rs.open sql,conn,1,1或rs.open sql,conn,1,3?
如果是,要使用rs.open sql,conn,3,1或rs.open sql,conn,3,3
aiting 2004-01-24
  • 打赏
  • 举报
回复
sl_p是什么?
  • 打赏
  • 举报
回复
一旦loop就停止数据了
tdhero 2004-01-24
  • 打赏
  • 举报
回复
哪一行是228行呀!

28,406

社区成员

发帖
与我相关
我的任务
社区描述
ASP即Active Server Pages,是Microsoft公司开发的服务器端脚本环境。
社区管理员
  • ASP
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧