| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 3865 人关注过本帖
标题:各位老大,Microsoft VBScript 运行时错误 错误 '800a01a8' 这个问题如何解 ...
只看楼主 加入收藏
gz52
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2007-8-5
收藏
 问题点数:0 回复次数:2 
各位老大,Microsoft VBScript 运行时错误 错误 '800a01a8' 这个问题如何解决呢?
Microsoft VBScript 运行时错误 错误 '800a01a8'

缺少对象: 'rs1'

/loit.asp,行 158
以上出错的是网站管理后台生成首页页面的页面
我在网上面查找过相关的资料,但都没有找到合适的答案,好像都是说是空间缓存导致的问题,不过以前我都没有出现过这样的情况,也没有换过空间,只是删除了网站所有的数据源码再上传上去就出现了以上的情况,希望高手指点下,谢谢~~~
以下是详细代码:
<!-- #include file="../cctv.asp" -->
<!-- #include file="cctv1_conn.asp"-->
<!-- #include file="cctv_char.asp" -->
<%server.scripttimeout=999999999%>
<%
action=request.QueryString("action")
Function GetPage(url)
dim Retrieval
Set Retrieval = CreateObject("Microsoft.XMLHTTP")
With Retrieval
.Open "Get", url, False ', "", ""
.Send
GetPage = BytesToBstr(.ResponseBody)
End With
Set Retrieval = Nothing
End Function
Function BytesToBstr(body)
dim objstream
set objstream = Server.CreateObject("adodb.stream")
objstream.Type = 1
objstream.Mode =3
objstream.Open
objstream.Write body
objstream.Position = 0
objstream.Type = 2
objstream.Charset = "GB2312"
BytesToBstr = objstream.ReadText
objstream.Close
set objstream = nothing
End Function
if action="allhtml" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclassid from kcnclass",conn,1,1
while not rs.eof
nclassid=rs("nclassid")
on error resume next
Url="http://"&webhtml&"/lost/loit.asp?id="&nclassid&""
wstr = GetPage(Url)
Set fs=Server.CreateObject("Scripting.FileSystemObject")
'if not MyFile.FolderExists(server.MapPath("/html/")) then
'MyFile.CreateFolder(server.MapPath("/html/"))'
'end if
If (fs.FileExists(server.MapPath("../../kcloit/")&"\loit"&nclassid&".html")) Then
fs.DeleteFile(server.MapPath("../../kcloit/")&"\loit"&nclassid&".html")
End If
Set CrFi=fs.CreateTextFile(server.MapPath("./../kcloit/")&"\loit"&nclassid&".html")
Crfi.Writeline(wstr)
set CrFi=nothing
set fs=nothing
rs.movenext
wend
response.write "<script language=javascript>alert('html页面转化成功!');window.location.reload('loit.asp')</script>"
rs.close
set rs=nothing
else
end if
%>
<%if action="loit" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select nclassid,anclass,nclass from kcnclass",conn,1,1
while not rs.eof
set nclassid=rs("nclassid")
set anclass=rs("anclass")
set nclass=rs("nclass")
sql="select peixunkechengid from peixunkecheng where Kcanclass='"&anclass&"' and Kcnclass='"&nclass&"' order by peixunkechengid desc"
set rs1=server.CreateObject("adodb.recordset")
rs1.open sql,conn,1,2
if rs1.eof and rs1.bof then
else
page=request("page")
if page="" then page=1
rs1.pagesize=10
Page=Page+1
Page=Page-1
rs1.absolutepage=page
ling=1
con=1
while not rs1.eof and con<=rs1.pagesize
ling=ling+1
con=con+1
rs1.movenext
wend
end if
ming01=1
ming02=rs1.pagecount
for so158page=ming01 to ming02
on error resume next
Url="http://"&webhtml&"/lost/loit.asp?id="&nclassid&"&page="&so158page&""
wstr = GetPage(Url)
Set fs=Server.CreateObject("Scripting.FileSystemObject")
'if not MyFile.FolderExists(server.MapPath("/html/")) then
'MyFile.CreateFolder(server.MapPath("/html/"))'
'end if
If (fs.FileExists(server.MapPath("../../kcloit/")&"\loit"&nclassid&""&so158page&".html")) Then
fs.DeleteFile(server.MapPath("../../kcloit/")&"\loit"&nclassid&""&so158page&".html")
End If
Set CrFi=fs.CreateTextFile(server.MapPath("./../kcloit/")&"\loit"&nclassid&""&so158page&".html")
Crfi.Writeline(wstr)
set CrFi=nothing
set fs=nothing
next
rs.movenext
wend
rs1.close
set rs1=nothing
rs.close
set rs=nothing
response.write "<script language=javascript>alert('html页面转化成功!');window.location.reload('loit.asp')</script>"
else
end if
%>
================================================
<%
if action="loitpage" then
set rs=server.CreateObject("adodb.recordset")
rs.open "select user_regionid from user_region where JiBie='代理培训机构' order by user_regionid desc",conn,1,1
while not rs.eof
user_regionid=rs("user_regionid")
sql="select Peixunkechengid from Peixunkecheng where user_regionid='"&user_regionid&"' order by user_regionid desc"
set rs1=server.CreateObject("adodb.recordset")
rs1.open sql,conn,1,2
if rs1.eof and rs1.bof then
else
page=request("page")
if page="" then page=1
rs1.pagesize=10
Page=Page+1
Page=Page-1
rs1.absolutepage=page
ling=1
con=1
while not rs1.eof and con<=rs1.pagesize
ling=ling+1
con=con+1
rs1.movenext
wend
end if
ming03=1
ming04=rs1.pagecount
for so158page=ming03 to ming04
on error resume next
Url="http://"&webhtml&"/lost/index01.asp?id="&user_regionid&"&page="&so158page&""
wstr = GetPage(Url)
Set fs=Server.CreateObject("Scripting.FileSystemObject")
'if not MyFile.FolderExists(server.MapPath("/html/")) then
'MyFile.CreateFolder(server.MapPath("/html/"))'
'end if
If (fs.FileExists(server.MapPath("../../school/")&"\edu158"&user_regionid&"b"&so158page&".html")) Then
fs.DeleteFile(server.MapPath("../../school/")&"\edu158"&user_regionid&"b"&so158page&".html")
End If
Set CrFi=fs.CreateTextFile(server.MapPath("./../school/")&"\edu158"&user_regionid&"b"&so158page&".html")
Crfi.Writeline(wstr)
set CrFi=nothing
set fs=nothing
next
rs.movenext
wend
rs1.close    《出现问题的是这一行》
set rs1=nothing
rs.close
set rs=nothing
response.write "<script language=javascript>alert('html页面转化成功!');window.location.reload('loit.asp')</script>"
else
end if
%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<form name="form1" method="post" action="?action=allhtml">
  <table width="500" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><input type="submit" name="Submit" value="将所有课程分类页面生成html"></td>
    </tr>
  </table>
</form>
<form name="form3" method="post" action="?action=loit">
  <table width="500" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><input type="submit" name="Submit" value="将所有分页页面生成html"></td>
    </tr>
  </table>
</form>
<form name="form3" method="post" action="?action=loitpage">
  <table width="500" border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td><input type="submit" name="Submit" value="将所有课程列表页面生成html"></td>
    </tr>
  </table>
</form>
<%
conn.close
set conn=nothing
%>
搜索更多相关主题的帖子: 时错误 Microsoft VBScript cctv1 老大 
2008-05-07 23:03
madpbpl
Rank: 4
等 级:贵宾
威 望:11
帖 子:2876
专家分:244
注 册:2007-4-5
收藏
得分:0 
set nclassid=rs("nclassid")
set anclass=rs("anclass")
set nclass=rs("nclass")
上面这几句不用set
你把出错的注释掉,可能是sql语句没有查询到你要的结果,所以rs1不存在的。
2008-05-08 01:21
gz52
Rank: 1
等 级:新手上路
帖 子:38
专家分:0
注 册:2007-8-5
收藏
得分:0 
十分感谢madpbpl的回答,不过呢?出错的还是这个问题~~~~~
2008-05-08 21:14
快速回复:各位老大,Microsoft VBScript 运行时错误 错误 '800a01a8' 这个问题如 ...
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.028076 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved