高手帮我看看分页错在哪里,在线等
<!--#include file="head.asp"-->
<table width="100%" height="100%" border=0 cellpadding=0 cellspacing=0 align=center>
<tr><td colspan=2>
<table width="100%" height=100% border=0 cellpadding=0 cellspacing=0 align=center>
<tr><td align=center background="pic/zxq.jpg" width=140>
</td></tr>
</table></td><td valign=top>
<table width="540" border="0" align="center" valign="top" cellspacing=0 cellpadding=0 class=1 style=word-break:break-all>
<%Dim ipagecount
Dim ipagecurrent
Dim strorderBy
Dim irecordsshown
if request.querystring("page")="" then
ipagecurrent=1
else
ipagecurrent=cint(request.querystring("page"))
end if
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "SELECT * FROM zp ORDER BY id asc"
rs.pagesize = 8
rs.cachesize = 8
MaxPage=8
rs.open sql,conn,1,1
ipagecount = rs.pagecount
If ipagecurrent > ipagecount Then ipagecurrent = ipagecount
If ipagecurrent < 1 Then ipagecurrent = 1
if ipagecount=0 then
response.write "<tr><td align='center'>暂时没有</td></tr>"
else
rs.absolutepage = ipagecurrent
irecordsshown = 0
do while irecordsshown<MaxPage and NOT rs.EOF%>
<tr><%for i=1 to 4%>
<td width='25%' height="155"><table border='0' align="center" cellpadding='0' cellspacing='0' style='width: 99'><tr>
<td align='center' bgcolor='#EEEEEE' style='height: 99'>
<%if rs.eof then%>
暂时没有
<%else%>
<%=rs("title")%><br><%=rs("word")%><%irecordsshown = irecordsshown +1
end if%>
</td></tr></table></td>
<%rs.movenext
next%>
</tr>
<%loop%>
<tr>
<td height='20' align='center' colspan='4'>每页显示 <%=MaxPage%> 张图片 第<font color="#FF0000"><%=ipagecurrent%></font>/<%=ipagecount%>页
<%if ipagecurrent=1 then
else
Response.Write"<a href='?page=1' class='red'>首页</a> | "
Response.Write"<a href='?page="&ipagecurrent-1&"' class='red'>上一页</a> | "
end if
if ipagecount>ipagecurrent then
Response.Write"<a href='?page="&ipagecurrent+1&"' class='red'>下一页</a> "
Response.Write"| <a href='?page="&ipagecount&"' class='red'>末页</a> "
end if%> </td></tr>
<%end if
rs.Close
set rs=nothing%>
</td></tr></table>
<!--#include file="foot.asp"-->
==============================================================
出错提示:
错误类型:
ADODB.Recordset (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/zuopin/index.asp, 第 43 行