出现Active Server Pages 错误 'ASP 0113' 怎办

来源:百度知道 编辑:UC知道 时间:2024/06/14 19:21:04
我运行代码是出现以下错误,我是在空间上运行的,不是在本地
Active Server Pages 错误 'ASP 0113'
超过了脚本运行的最长时间。可以为 Server.ScriptTimeOut 属性指定新值或更改 IIS 管理工具中的相应值来更改此限制。

请教各位高手。
我代码是
sum=0
set rs3=server.CreateObject("adodb.recordset")
rs3.Open "select top 2 * from orders where state=5 and goods like '2009%' order by actionid desc",conn,1,1
do while not rs3.eof
price=int(rs3("proprice2"))*rs3("productnum")
sum=sum+price
loop
rs3.Close
set rs3=nothing

我改成select top 1就没问题了

set rs3=server.CreateObject("adodb.recordset")
rs3.Open "select top 1 * from orders where state=5 and goods like '2009%' order by actionid desc",conn,1,1
price=int(rs3("proprice2"))*rs3("productnum")
sum=sum+price
rs3.Close
set rs3=nothing
在loop上加
rs3.movenext

还是不行

select top 2 * from orders where state=5 and goods like '2009%
这个执行时间过长时没道理的。

你将这句单独的提到 查询分析器里查询下看看,看是否需要很长时间,我觉得,单看这句,没问题,是不是程序其它部分有问题??

记录集指针没有下移!
在loop上加
rs3.movenext