<%
id=Request.QueryString("id")
if id="" then
id=0
end if
%>
<%
per=Request.QueryString("per")
if per="" then
per=1
end if
%>
<%
lower=0
upper=0
lower=cint(id)*cint(per)
upper=cint(id)*cint(per)+cint(per)+1
%>
<%
db="../Database.mdb"
Set cOnn= Server.CreateObject("ADODB.Connection")
conn.Open "driver={Microsoft Access Driver (*.mdb)};pwd=admin;dbq=" & Server.MapPath(db)
%>
<%
Set rs = Server.CreateObject( "ADODB.Recordset" )
sql = "select * from test where id>"&lower&" and id<"&upper&";"
rs.open sql,conn,1,3
%>
<%
if (rs.bof and rs.eof) then
%>
<%
if (id<0) then
%>
暂无
下一页
<%
else
%>
暂无
上一页
<%
end if
%>
<%
else
do while not rs.eof
%>
<%=rs("id")%>
<%=rs("username")%>
<%=rs("password")%>
<%
rs.movenext
loop
%>
<%
Set rs = Server.CreateObject( "ADODB.Recordset" )
sql = "select count(*) as total from test;"
rs.open sql,conn,1,3
total=rs("total")
pages=cint(total)/cint(per)
%>
第
/<%=cint(pages)%>
页
每页显示1|2|3条记录
上一页下一页
<%
end if
%>
<%
rs.close
set rs=nothing
conn.close
set cOnn=nothing
%>