我用的是动感下载系统SQL版,在生成网页的时候显示这样的错误。
ADODB.Command 错误 '800a0cc1'
在对应所需名称或序数的集合中,未找到项目。
F:\01XIACOM060616\ADMIN\../cls_Mesky_showPage.asp,行 189
下面是显示错误代码的位置
Case "MSSQL" 'sqlserver2000数据库
If Mesky_currentPage = 1 Then
ResultSet_Sql = "SELECT TOP " & Mesky_PageSize & " " & Mesky_Field & " FROM " & Mesky_Table & Mesky_Where & " " & Mesky_OrderBy
Else
ResultSet_Sql = "SELECT " & Mesky_Size & "(" & Mesky_Id & ") FROM (SELECT TOP " & (Mesky_currentPage - 1) * Mesky_PageSize & " " & Mesky_Id & " FROM " & Mesky_Table & Mesky_Where & " " & Mesky_OrderBy & ") AS tmpTable"
Mesky_Mm = Conn.Execute(ResultSet_Sql, 0, 1)(0)
ResultSet_Sql = "SELECT TOP " & Mesky_PageSize & " " & Mesky_Field & " FROM " & Mesky_Table & " WHERE " & Mesky_Id & Mesky_Order & Mesky_Mm & Mesky_WhereOther & " " & Mesky_OrderBy
End If
Set ResultSet = Conn.Execute(ResultSet_Sql)
Case "MSSQL_SP" 'sqlserver2000数据库存储过程版
'Set Mesky_Rs=server.CreateObject("Adodb.RecordSet")
Set Mesky_Cm = Server.CreateObject("Adodb.Command")
Mesky_Cm.CommandType = 4
Mesky_Cm.ActiveConnection = Conn
Mesky_Cm.CommandText = "SP_Mesky_showPage"
Mesky_Cm.Parameters(1) = Mesky_currentPage
Mesky_Cm.Parameters(2) = Mesky_PageSize
Mesky_Cm.Parameters(3) = Mesky_Field
Mesky_Cm.Parameters(4) = Mesky_Table
Mesky_Cm.Parameters(5) = Mesky_Where
Mesky_Cm.Parameters(6) = Mesky_WhereOther
Mesky_Cm.Parameters(7) = Mesky_OrderBy
Mesky_Cm.Parameters(8) = Mesky_Id
Mesky_Cm.Parameters(9) = Mesky_Size
Mesky_Cm.Parameters(10) = Mesky_Order
Set ResultSet = Mesky_Cm.Execute
Case Else '其他情况按最原始的方法处理
Set ResultSet = Server.CreateObject("adodb.RecordSet")
ResultSet_Sql = "SELECT " & Mesky_Field & " FROM " & Mesky_Table & " " & Mesky_Where & " " & Mesky_OrderBy
ResultSet.open ResultSet_Sql, Conn, 1, 1, &H1
ResultSet.AbsolutePosition = (Mesky_currentPage - 1) * Mesky_PageSize + 1
End Select
End If
End Property
參考答案:记录集里没有那个字段的相关记录。