按压式瓶盖打开技巧 图:ADODB.Recordset (0x800A0E7D)连接无法用于执行此操作。在此上下文中它可能已被关闭或无效

来源:百度文库 编辑:神马品牌网 时间:2024/05/03 00:23:34
<!--#include file = "Inc/DBClass.inc.asp"-->
<%
Dim s_keyword, s_cataid, s_RootID
s_keyword = GetSafeStr(Trim(Request("keyword")))
s_cataid = GetSafeStr(Trim(Request("cataid")))

'当然更改为其他跟栏目的时候,只需要适当的更改下面的值,就可以实现不同栏目。
s_RootID = "A"

If s_cataid = "" Then
s_cataid = s_RootID
End If

'检测当前类别类别的合法性,其实我感觉检测与否对系统影响不大

Dim bRs, bSql
Set bRs = Server.CreateObject( "ADODB.Recordset" )
bSql = "SELECT * FROM NewsCata Where C_RootID = '"&s_cataid&"'"
bRs.Open bSql, oConn, 0, 1
If bRs.Eof Then
GoError "请通过页面上的链接进行操作,不要试图进行任何非法操作。"
End If
bRs.Close
Set bRs = Nothing

Dim Pmcount,Pageno
'//设置文章显示数量
Pmcount = News_Front_Count
%>谁能帮我解决一下,谢谢了,出错的是bRs.Open bSql, oConn, 0, 1 这句!

oConn 连接出错了。
检查一下头文件吧
DBClass.inc.asp ?看看是不是包含文件错了。

bRs.Open bSql, oConn, 0, 1
改成
bRs.Open bSql, oConn, 3, 1
试试