高手们帮偶呀,关于分页的
我用了pagesize=5,但实际页面显示出来还是全部的记录,这是怎么回事呀?
是不是使用pagesize这一系列属性需要什么特殊条件呀?
dim sty,txt,ss
sty=request.Form("sty")
txt=request.Form("txt")
' Set conn = Server.CreateObject("ADODB.Connection")
DBPath = Server.MapPath("#starark.mdb")
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & DBPath
' rs.CursorLocation=adUseClient
' SET rs = Server.CreateObject("ADODB.Recordset")
set rs=server.createobject("adodb.recordset")
if txt="" then
if request("city")="" then
Rs.Open "Select * From User where UserLevel=99 order by LastLoginTime desc" , conn,1,1
else
rs.open "Select * From User where UserLevel=99 and QQ='"+request("city")+"' order by LastLoginTime desc",conn,1,1
end if
else
if sty=1 then ss="dwmc" end if
if sty=2 then ss="zsxm" end if
if sty=3 then ss="lxdh" end if
if sty=4 then ss="xxdz" end if
Rs.Open "Select * From User where UserLevel=99 and "&ss&" like '%"&txt&"%'",conn,1,1
end if
if rs.eof and rs.bof then
response.Write(cstr(rs.recordcount))
response.write "对不起,暂时没有任何信息。"
else
rs.pagesize=5
'rs.absolutepage=1
if request("page")<>"" then
rs.absolutepage=cint(request("page"))
end if