<%
If request("page") = "" Then currentpage=1 else currentpage =request("page")
set rs=server.CreateObject("adodb.recordset")
Url="../products/index.asp"
set rs = server.CreateObject("adodb.recordset")
SqlMinList = "select MaxID,MaxName,MaxRank from ProductMax10 ORDER BY MaxRank"
rs.open SqlMinList, objConn, 1, 1
msg_per_page = 2 '页/条
rs.PageSize=msg_per_page
totalpage = rs.PageCount
totalmessage = Rs.recordcount
If totalmessage <> 0 Then
Rs.AbsolutePage = currentpage
End If
for i=1 to msg_per_page
'===========================
%>
<% =rs("MaxName")%><br>
<%
rs.movenext
next
response.write ExportPageInfo(totalpage,totalmessage,request("page"),PAGE_SIZE,msg_per_page,""&Url&"?")
'--------------------------------------------------------------
Function ExportPageInfo(ByRef PageCount,RecordCount,CurrentPage,PageSize,i,LinkFile)
'总页数,总记录数, 当前页面, 每页显示数,本页记录数,分页时链接的文件
Dim retval,j,pageNumber,BasePage
BasePage = (CurrentPage \ 10) * 10
If BasePage > 0 Then retval = retval & "<a href='"&LinkFile&"page="&(BasePage-9)&"'><<</a>"
For j = 1 to 10
pageNumber = BasePage+j
if pageNumber<10 then pageNumber=pageNumber
If cint(PageNumber) > pagecount Then Exit For
If cint(PageNumber) = Cint(CurrentPage) Then
retval = retval & " "&pageNumber& " "
Else
retval = retval & " <a href='"&LinkFile&"page="&pageNumber&"'>"&pageNumber&"</a>"
End If
Next
if PageCount < BasePage + 11 then
retval = retval & " >>"
else
If pagecount > BasePage Then retval = retval & " <a href='" & LinkFile & "page=" & (BasePage + 11) & "'>>></a>"
end if
ExportPageInfo = retval
End Function
%>
1 2 3 4 5 >>
点第5页时出来以下错误,请问哪位高手知道什么样子修改呢?
玻璃吸盘系列
ADODB.Field 错误 '80020009'
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/baishida/products/index.asp,行 0