asp留言板程序ADODB.Recordset 错误 '800a0cb3'
当前记录集不支持书签。这可能是提供程序或选定的游标类型的限制。rsobj.AbsolutePage = page这几行是不是有错?要怎么攺
<%
Sub DispPage(RSobj,Page)
rsobj.AbsolutePage = page
For Page=1 to RSobj.PageSize
Name=RSobj("Name")
Email=RSobj("Email")
Sex=RSobj("Sex")
Subject=RSobj("Subject")
Content=RSobj("Content")
MessTime=RSobj("Datetime")
If Email=""Then
Email="暂不提供"
Else
Email="<a href='mailto:"& Email &"'><font>"& Email &"</font></a>"
End if
%>
<div align="center">
<table>
<table width="584">
<tr><td>姓名:<% =name %>[<% =sex %>]</td></tr>
<tr><td>Email:<% =email %></td></tr>
</table>
<table width="584">
<tr><td width="584">主题:<% =subject %></td></tr>
<tr><td width="584">留言时间:<% =messtime %></td></tr>
<tr><td width="584">
<textarea rows='3' cols='80' name='br'><% =content %></textarea>
</td></tr>
</table>
</table>
<%
Rsobj.MoveNext
if RSobj.EOF then exit for
next
end sub
%>
<%
set ConnObj=Server.CreateObject("ADODB.Connection")
connstr="DBQ="+server.mappath("message.mdb")+";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
ConnObj.Open connstr
Set RSobj=Server.CreateObject("ADODB.Recordset")
SQL="Select * From message order By Datetime DESC"
Rsobj.Open SQL,ConnObj,adOpenStatic
RecNum=RSobj.recordCount
PSize=2
RSobj.PageSize=pSize
Response.write"<Center>数据库共记录"&RecNum&"条,"&"分"&RSobj.PageCount&"页显示</center><br>"
Page=request("Page")
If Request("Page")=""Then
Page=1
else
Page=CLng(Request("Page"))
If Page<1 Then Page=1
If Page>RSobj.PageCount Then Page =RSobj.PageCount
End if
DispPage RSobj,Page
%>
<%
If Page <> 1 Then
Response.Write"<a href=ly.asp?Page=1&>第一页</a> "
Response.Write"<a href=ly.asp?Page="&(Page-1)&">上一页</a> "
end If
If Page <> RSobj.PageCount Then
Response.Write"<a href=ly.asp?Page="&(Page+1)&">下一页</a> "
Response.Write"<a href=ly.asp?Page="& RSobj.PageCount &">最后一页</a>"
end If
%>
跳转页数:<input type="text" size="3" name="Page" value=<% =Page %>>
页数: <% =Page %>/<% =RSobj.PageCount %>
<input type=submit value="GO!">
</table>
<div>
</form>