问一个超奇怪的问题,很郁闷,在线等,寻找原因
我有一段asp代码,在本地的iis上可以正常跑起来,但在美国那边的服务器就跑不起来,是个死循环错误,解了一个上午,没有找到原因,请教达人。
代码
<!--#include file="DBCONN.ASP"-->
<%
sql="select * from Data where commodity='TY' and put_call='Put'"
set rs=server.createobject("adodb.recordset")
rs.Open sql,conn,1,1
%>
html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body bgcolor="#eeeeee">
<hr width="90%">
<table width="90%" border="0" align="center" bordercolorlight="#5D7488" bordercolordark="#FFFFFF">
<%do while not rs.eof%>
<tr>
<td> 111111111111111111111111111111111111
</td>
</tr>
<%
rs.movenext
loop
%>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>
dbconn.asp
<%
dim conn
dim connstr
on error resume next
connstr="DBQ="+server.mappath("dd.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
set conn=server.createobject("ADODB.CONNECTION")
conn.open connstr
%>
服务器跑的时候报错为:
Active Server Pages error 'ASP 0113'
Script timed out
/mark/LgCk.asp
The maximum amount of time for a script to execute was exceeded. You can change this limit by specifying a new value for the property Server.ScriptTimeout or by changing the value in the IIS administration tools.
数据库在同一级目录中
把do loop去掉,服务器就可以运行了,我试图去掉循环加一句得到response.write rs.recordCount打印出记录总数,但在服务器上就是不执行这句话,也不报错。
<!--#include file="DBCONN.ASP"-->
<%
sql="select * from Data where commodity='TY' and put_call='Put'"
set rs=server.createobject("adodb.recordset")
rs.Open sql,conn,1,1
%>
html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"></head>
<body bgcolor="#eeeeee">
<hr width="90%">
<table width="90%" border="0" align="center" bordercolorlight="#5D7488" bordercolordark="#FFFFFF">
<tr>
<td><%response.write rs.recordCount%> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
<%
rs.close
set rs=nothing
conn.close
set conn=nothing
%>