<%
dim str,rce,conn
str="provider=microsoft.jet.oledb.4.0;data source="&server.MapPath("rong.mdb")
set conn=server.CreateObject("adodb.connection")
conn.open str
set rce=server.CreateObject("adodb.recordset")
rce.open"select*from biao ",conn,1,1
%>
<%rce.pagesize=3
qwe=rce.pagecount
page=int(request ("page"))
if page<=0 then page=1
if request ("page")="" then page=1
rce.absolutepage=page%>
<%if rce.eof and rce.bof then
response.Write("没有记录")
else
for i=1 to rce.pagesize
response.write("<br>名字:"& rce("name"))
response.write("<br>日期:"& rce("rq"))
response.write("<hr>")
rce.movenext
next
end if%>
</p>
<% for i=1 to qwe %>
<a href="dext.asp?page=<%=i%>"><%=i%></a>
<%next%>
<% rce.close
set rce=nothing
%>
高手帮看看上面的ASP分页代码,我设的是每页显示3行记录,如果数据库里的记录要是有3 6 9 12...这些3的倍数就显示正常要是数据库里的记录条数是2 7 8 10...这些不是3的倍数那么最后一页连接就会出现错误,希望高手能帮解决一下.