这里
do while not rshot.eof 是不是应该是 do while not rs.eof
..........
loop
set rshot=nothing 是不是应该是 set rs=nothing 不过这一句不会有你说的那种提示,只是前后不一致
<%sql="select top 4 * from Product "
Set rs= Server.CreateObject("ADODB.Recordset")
rs.open sql,conn,1,3
do while not rshot.eof ‘注意此处应该是rs 不是rshot
line=line&"
rs.movenext
loop
rs.close
set rshot=nothing ‘此处也是
xmlfile=server.mappath("imglink.xml")
Set fso = CreateObject("Scripting.FileSystemObject")
Set MyFile = fso.CreateTextFile(xmlfile,True)
MyFile.WriteLine("")
MyFile.WriteLine("
MyFile.WriteLine line
MyFile.WriteLine("
MyFile.Close
%>
你这是直接自制别人的代码吧,你定义的变量是Rs,你怎么引用到Rshot了呢,把Rshot换成Rs
do while not rshot.eof
修改为===>
do while not rs.eof
set rshot=nothing
修改为===>
set rs=nothing
记录集对象不一样,而且你估计使用了on error resume next,所以程序错误了,他还是不断循环,所以出现超时了!
建议你 开发适合,把On Error Resume Next 注释掉,
等到部分时候,再把它开启!
这样在开发过程中可以及时发现错误,并修正!