New Document <% const intpagesize=5
dim rs,intcur,i,inttotal
if request.servervariables("content_length")=0 then
intcur=1
else
intcur=cint(request.form("curpage"))
select case request.form("page")
case "首页"
intcur=1
case "下一页"
intcur=intcur+1
case "上一页"
intcur=intcur-1
case "尾页"
intcur=cint(request.form("lastpage"))
end select
end if
set cn=server.createobject("adodb.connection")
cn.open "DRIVER={Microsoft Access Driver (*.mdb)};DBQ=F:\one\database\booree.mdb"
set rs =server.createobject("adodb.recordset")
strsql="select address from member "
rs.cursortype=adopenstatic
rs.cursorlocation=aduseclient
rs.open strsql,cn
rs.cachesize=intpagesize
rs.pagesize=intpagesize
inttotal=rs.pagecount
if not rs.eof then
rs.absolutepage=intcur
end if
%>
<% i=1
with response
if rs.eof then
.write " there in no record!"
else
.write "
公司 |
"
end if
do until rs.eof and i< intpagesize
.write""& rs.fields("address") &" |
"
rs.movenext
i=i+1
loop
.write "
"
end with
rs.close
%>