asp分页问题,哪位高手帮帮忙
分页问题,数据库中有10条记录,我分别为a,b,c,d,e,f,g,h,i,j;现在出现个问题,我想每页显示3条,可是第一页出现的是全部10条,第二页出现的是d,e,f,g,h,i,j;第三页出现的是g,h,i,j;第四页出现的是j;哪儿大侠能帮一忙'显示报名会员信息
<%set rsa=Server.CreateObject("ADODB.recordset")
sqla="select P_HuiYuan From Ejz_HuoDong_BaoMing where P_Hd_Id="&request.QueryString("id")&" and P_HuiYuan<>''"
'set rsa=conn.execute(sqla)
rsa.open sqla,conn,3
'response.Write(sqla)
If not rsa.eof Then
Rsa.Pagesize = 3'每页显示记录数
Psize = Rsa.PageSize
PCount = Rsa.PageCount'总页数
RCount = Rsa.RecordCount'总记录数
'response.Write(PCount)
PageNo = Cint(Request.QueryString("PageNo"))
if PageNo="" then PageNo=1
If PageNo < 1 Then
PageNo = 1
Elseif PageNo > PCount Then
PageNo = PCount
End If
'if not rsa.eof then rsa.AbsolutePage =PageNo
if not (rsa.bof and rsa.eof) then Rsa.AbsolutePage = PageNo %>
...........显示内容,已省略
共<Font color="#FF0000"><%= RCount %></Font>条 分<Font color="#FF0000"><%= PCount %></Font>页
| 当前第<Font color="#FF0000"><%= PageNo %></Font>页</td>
<td width="30%" align="right">
<%
If PageNo > 1 Then
Response.write "<a href=""Index.BaoMing.asp?id="&request.QueryString("id")&""">首页</a> "
Response.write "<a href=""?id="&request.QueryString("id")&"&PageNo="&PageNo-1&""">上页</a> "
Else
Response.write "首页 "
Response.write "上页 "
End if
%>
<select name="menu2" onChange="form.submit();" style="width:40px;">
<%For i =1 to PCount
%>
<option value="?PageNo=<%= i %>&id="&request.QueryString("id")&"" <% If i = PageNo Then Response.write "Selected"%>><%=i%></option>
<% Next %>
</select>
<%
If PageNo < PCount Then
Response.write "<a href=""?id="&request.QueryString("id")&"&PageNo="&PageNo+1&""">下页</a> "
Response.write "<a href=""?id="&request.QueryString("id")&"&PageNo="&PCount&""">尾页</a>"
Else
Response.write "下页 "
Response.write "尾页"
End if
%>