ADODB.Recordset (0x800A0E78)对象关闭时,不允许操作。

fangkunsong fangkunsong 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
问题如标题,出错行为标红色行
<!--#include file="../inc/fk_conn.asp"-->
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="../images/css2.css" rel="stylesheet" type="text/css">
<script language=javascript>
function allcheck()
{
var a = document.getElementsByTagName("input");
if(a[0].checked==true){
for (var i=0; i<a.length; i++)
if (a[i].type == "checkbox") a[i].checked = false;
}
else
{
for (var i=0; i<a.length; i++)
if (a[i].type == "checkbox") a[i].checked = true;
}
}
</script>
</head>
<body>

<%dim action
action=request.QueryString("action")%>

.... <%'开始分页
Const MaxPerPage=12
dim totalPut
dim CurrentPage
dim TotalPages
dim j
dim sql
if Not isempty(request("page")) then
currentPage=Cint(request("page"))
else
currentPage=1
end if
set rs=server.CreateObject("adodb.recordset")
select case action
case "no"
rs.open "select shop_books.bookname,shop_books.bookid,shop_pinglun.pinglunid,shop_pinglun.pingluncontent,shop_pinglun.pinglunname,shop_pinglun.pinglundate from shop_pinglun,shop_books where shop_books.bookid=shop_pinglun.bookid and shop_pinglun.shenhe=0 order by shop_pinglun.pinglundate desc",conn,1,1
case "yes"
rs.open "select shop_books.bookname,shop_books.bookid,shop_pinglun.pinglunid,shop_pinglun.pingluncontent,shop_pinglun.pinglunname,shop_pinglun.pinglundate from shop_pinglun,shop_books where shop_books.bookid=shop_pinglun.bookid and shop_pinglun.shenhe=1 order by shop_pinglun.pinglundate desc",conn,1,1
end select
if rs.eof And rs.bof then
%>
<table width="100%" border="1" align=center cellspacing="0" cellpadding="3" bordercolordark="#FFFFFF" bordercolorlight="#666666">
<tr>
<td bgcolor="#ece9d8"><div align="center"><font color=red>目前还没有未审阅评论!</font></div></td>
</tr>
</table>
<br>
<%else
totalPut=rs.recordcount

if currentpage<1 then
currentpage=1
end if

if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if

if currentPage=1 then
showContent
showpage totalput,MaxPerPage,"managepinglun.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"managepinglun.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"managepinglun.asp"
end if
end if
end if

sub showContent
dim i
dim i_mun
dim i_color
i=0:i_mun=1

%>

... <%

do while not rs.eof
if i_mun mod 2=1 then
i_color="#ffffff"
else
i_color="#eeeeee"
end if%>

<tr bgcolor=<%=i_color%>>

<td><div align="center"><input name="shenhe" type="checkbox" id="shenhe" value="<%=rs("pinglunid")%>"></div></td>
<td><div align="center"><%if len(rs("bookname"))>15 then
response.write "<a href=../book.asp?id="&rs("bookid")&" target=_blank>"&left(trim(rs("bookname")),12)&"...</a>"
else
response.write "<a href=../book.asp?id="&rs("bookid")&" target=_blank>"&trim(rs("bookname"))&"</a>"
end if
%></div></td>
<td><div align="center"><% if len(rs("pingluncontent"))>20 then
response.write "<a href=# onClick=""javascript:window.open('listpinglun.asp?id="&rs("pinglunid")&"','','width=300,height=120,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"" title="&trim(rs("pingluncontent"))&">"&left(trim(rs("pingluncontent")),17)&"...</a>"
else
response.write "<a href=# onClick=""javascript:window.open('listpinglun.asp?id="&rs("pinglunid")&"','','width=300,height=120,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"" title="&trim(rs("pingluncontent"))&">"&trim(rs("pingluncontent"))&"</a>"
end if%></div></td>
<td><div align="center"><%
response.write rs("pinglunname")
%></div></td>
<td><div align="center"><%
response.write month(rs("pinglundate"))&"/"&day(rs("pinglundate"))
%></div></td>
</tr>
<%
i_mun=i_mun+1
i=i+1
if i>=MaxPerPage then Exit Do
rs.movenext
loop
rs.close
set rs=nothing
%>
.... <%
End Sub

Function showpage(totalnumber,maxperpage,filename)
Dim n

If totalnumber Mod maxperpage=0 Then
n= totalnumber \ maxperpage
Else
n= totalnumber \ maxperpage+1
End If

Response.Write "<form method=Post action="&filename&"?action="&action&">"
Response.Write "<p align='center' class='contents'> "
If CurrentPage<2 Then
Response.Write "<font class='contents'>首页 上一页</font> "
Else
Response.Write "<a href="&filename&"?page=1&action="&action&" class='contents'>首页</a> "
Response.Write "<a href="&filename&"?page="¤tPage-1&"&action="&action&" class='contents'>上一页</a> "
End If

If n-currentpage<1 Then
Response.Write "<font class='contents'>下一页 尾页</font>"
Else
Response.Write "<a href="&filename&"?page="&(CurrentPage+1)&"&action="&action&" class='contents'>"
Response.Write "下一页</a> <a href="&filename&"?page="&n&"&action="&action&" class='contents'>尾页</a>"
End If
Response.Write "<font class='contents'> 页次:</font><font class='contents'>"¤tPage&"</font><font class='contents'>/"&n&"页</font> "
Response.Write "<font class='contents'> 共有"&totalnumber&"条记录 "
Response.Write "<font class='contents'>"
Response.Write "</form>"
End Function
%>
</td>
</form>


.....
...全文

相关推荐

ASP错误总结,解决ASP错误。

ADODB.Stream (0x800A0BBC)---上传文件时发生错误--找不到上传的目录 (0x80020009)---当前rs指针所指向记录的字段值为NULL,不能使用 ADODB.Field (0x80020009)---当前rs指针所指向记录的字段值为NULL,不能输出 ADODB.Field (0x800A0BCD)---没有找到相关记录,不能用rs("字段")取值 ADODB.Recordset (0x800A0BB9)---没有打开数据库(没有打开conn)(rs已经打开一个表,不能再用rs打开别的表) ADODB.Recordset (0x800A0BCD)---记录指针已经指向表尾,不能再执行rs.movenext指令 ADODB.Recordset (0x800A0C93)---更改或添加完记录没有更新(rs.更新)就关闭链接(rs.close) ADODB.Recordset (0x800A0CB3)---数据库操作错误(表在读的方式打开不能添加数据) ADODB.Recordset (0x800A0CC1)---数据库操作错误(在打开的表中找不到指定的字段) ADODB.Recordset (0x800A0E78)---数据库操作错误(rs没有打开表不能用rs.close结束)(rs已经关闭,不能再用rs读取数据) ADODB.Recordset (0x800A0E79)---数据库操作错误(rs已经打开一个表,不能再打开别的表) ADODB.Recordset (0x800A0E7D)---打开表错误(缺少参数)(有可能是忘了写",conn,1,1")

蜗牛的小小梦想

asp程序错误详细说明例表

asp程序错误详细说明例表

weixin_38658405

aspword

对你们没用,我自己用的。哈哈

wupostname

SQLServer ADODB.Recordset 错误“800a0e78”,对象关闭时,不允许操作

今天在帮一个客户维护网站的时候,运行asp提示ADODB.Recordset 错误“800a0e78”,对象关闭时,不允许操作,原来是asp与sqlserver的连接出问题导致

weixin_38594687

adodb.recordset.open(rs.open)方法参数详解

主要介绍了adodb.recordset.open(rs.open)方法参数详解,需要的朋友可以参考下

weixin_38654220
评论 9
收藏 已收藏
分享
返回顶部
fangkunsong
ASP 28,401 成员 356,940 内容