<!-- #include file="ADOFunctions.inc" --> 
  <script language="vbscript">
   sub gopage()
      if window.event.keycode=13  then      '若按回车键
        page=document.formpage.pagenum.value    '获取文本框中输入的页号
        window.location.href="GuestBook.asp?pagenum=<%=page%>"
     end if
  end sub
  </script>
  <%
    '从数据表中读取记录并存放在Recordset对象中
      sqll="select * from duishou"
      Set objRS = Server.CreateObject("ADODB.Recordset") 
      objRS.open sqll,objConn,3    
      
      
      If ObjRs.eof and ObjRs.bof Then
Response.write "没有记录"
Response.End()
End if   
      '读取“liuyan”数据表的所有记录
      '设置分页大小,您可视实际情况设置其他数值 
      objRS.PageSize =2
  if request.querystring("pagenum")="" then
     pagenum=1
  else
     pagenum=clng(request.querystring("pagenum"))
  end if
  objRS.absolutepage=pagenum
  %>
<html>
<head><title> 分页显示数据</title></head>
<body bgcolor="#F9FFF0" text="#000000">
<table width="550" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr>
    <td> 
    <form name="formpage">
  <%
  response.write"共"&objRS.recordcount&"条记录,第"&pagenum&"/"&objRS.pagecount&"页  "
  if pagenum=1 then
    response.write "[上一页]"
  else
  %>
 [<a href=GuestBook.asp?pagenum=<%=pagenum-1%>>上一页</a>]     
 <%
 end if
 if pagenum=objRS.pagecount then
  response.write "[下一页]"
 else
 %>
[<a href=GuestBook.asp?pagenum=<%=pagenum+1%>>下一页</a>]     
<%
end if
if pagenum>1 then
%>
[<a href=GuestBook.asp?pagenum=1>首页</a>]     
 <%
 else
 response.write "[首页]"
 end if
 if pagenum<objRS.pagecount then
 %>
 [<a href=GuestBook.asp?pagenum=<%=objRS.pagecount%>>尾页</a>]     
  <%
  else
 response.write "[尾页]"
 end if 
 %>
 第<input type=text size=4 name="pagenum" onkeypress="gopage()">页     
 </form>
 </td>
 </tr>
</table>
 <% 
    '显示留言并加以格式化
    objRS.AbsolutePage = PageNum 
 %>
<tr>      
    <td width="292"> </td>      
    <td width="213"><a href="delduishou.asp?id=<%=objRS("编号")%>">删除</a> </td>
    <td width="292"> </td>      
    <td width="213"><a href="jzdswrite.asp?id=<%=objRS("编号")%>">编辑</a> 
</td>  
</tr>
为什么我一步步删除的时候正常
可是翻到下一页的时候删除就出现错误啊
错误类型:
ADODB.Recordset (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/7.5/GuestBook.asp, 第 77 行



 
											
 
	    

 
	
 
											

