|
我从网上下载了一个留言簿(申江留言本精简版),在家里调试能用,但上传到服务器后,第一次使用时能打开留言簿,再次就无法打开了,错误提示如下:
ADODB.Recordset 错误 '800a0e78'
对象关闭时,不允许操作。
/txtb/index.asp,行 111
相应页面的代码如下(无关代码已经删除),请大家帮助指点!
<!-- #include file="config.asp" -->
<!-- #include file="md5.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>《QS98软件室》留言簿</title>
<!-- #include file="style.asp" -->
</head>
<body>
<%
response.expires=-1
Dim cn,rs
set cn=server.CreateObject("ADODB.Connection")
set rs=server.CreateObject("ADODB.Recordset")
CreateConn cn,dbtype
Dim ItemsCount,PagesCount,CurrentItemsCount,ipage
get_divided_page cn,rs,"SELECT COUNT(id) FROM main","SELECT * FROM main","id DEC",Request.QueryString("page"),ItemsPerPage,ItemsCount,PagesCount,CurrentItemsCount,ipage
%>
<div align="<%=TableAlign%>">
<%while rs.EOF=false and Response.IsClientConnected%> '出错的代码行
<!-- #include file="listword.asp" -->
<%
rs.MoveNext
wend
%>
<table border="1" cellpadding="2" style="width:<%=TableWidth%>px; margin-top:20px; border-collapse:collapse; table-layout:fixed;" bordercolor="<%=TableBorderColor%>">
<tr style="height:25px; text-align:center;">
<td style="color: <%=TableTitleColor%>; font-weight: bold; background-color: <%=TableTitleBGC%>; background-image: url('image/bar_blue.gif')">
[留言分页]
</td>
</tr>
<tr>
<td style="color:<%=TableContentColor%>; padding:5px; vertical-align:top; background-color:<%=TableContentBGC%>;">
<%
for j=1 to PagesCount
if j=ipage then
Response.Write "<span style=""color:#FF0000"">[" &cstr(j)&"] </span>"
else
Response.Write "<a href=""index.asp?page=" & cstr(j) & """>[" &cstr(j)&"]</a> "
end if
next
%>
</td>
</tr>
</table>
</div>
<!-- #include file="top.asp" -->
<%
rs.Close
cn.Close
set rs=nothing
set cn=nothing
%>
</body> |
|