New Document <% const intpagesize=5
dim intcur,inttotal,i
dim rst,strconn,sql
if request.servariables("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:\booree\database\booree.mdb"
set rst=server.createobject("adodb.recordset")
sql="select * from member"
rst.cachesize=intpagesize
rst.cursortype=adopenstatic
rst.cursorlocation=aduseclient
rst.open sql.cn,1,1
rst.pagesize=8
if not rst.eof then
rst.absolutepage=intcur
end if
inttotal=rst.pagecount
%>
<%
i=1
with response
if rst.eof then
.write "there is no record in the database !"
else
.writ "
公司名称 |
"
end if
do until rst.eof and i< rst.pagesize
.write "|
>"&rst.fields("address")&"
"
rst.movenext
i=i+1
loop
.write "
"
end with
rst.close
%>