脚本超时,麻烦大家帮我检查一下!谢谢...

来源:百度知道 编辑:UC知道 时间:2024/05/17 21:56:14
我查询这段代码的时候总是显示脚本超时,不知道是不是我的代码有死循环?我检查不出来了,,,麻烦大家帮帮忙,谢谢...
代码如下::

<%
rs=server.createobject("adodb.recordset")
rs1=server.createobject("adodb.recordset")
sql="select * from Intime_join"
rs.open sql,conn,1,1
while not rs.eof
sql1="select * from Intime_fbip where fbip='"&rs("fbip_Intime_join")&"'"
rs1.open sql1,conn,1,1
if not ( rs1.eof and rs1.bof ) then
while not rs1.eof
response.write rs1("companyname")
rs1.movenext
wend
end if
rs1.close
rs.movenext
wend
rs.close
set rs=nothing
set rs1=nothing
%>
没人知道吗?

这是asp,不是.net。
我不太记得打开recordset的时候最后那两个参数(是游标和锁吧)的1是什么含义了。
但你要检查一下,把这两个换成只读并且只向前的。

其实更好的办法是,先循环第一个,然后装入一个数组,然后关闭第一个recordset,然后循环这个数组再操作第二个。不要做recordset的嵌套循环。