<%language="vbscript"
set conn=server.createobject("adodb.connection")
conn.oen "driver={sql server};server=huang;uid=sa;pwd=;database=test"
<%pgsize=5
page=request.querystring("page")
sql="select * from test where id1=1"
rs.open sql,conn,1
rs.pagesize=pgsize
pgnm=rs.pagecount
if page=""or clng(page)<1 then page=1
if clng(page)>pgnm then page=pgnm
if pgnm>0 then rs.absolutepage=page
count=0
do while not rs.eof and count<pgsize
%><%rs("id1")%><br>
<%=d%><br>
<%count=count+1
rs.movenext
loop
rs.close
set rs=nothing
%>
<a href=dis.asp?page=1>第一页</A>
<A HREF=DIS.ASP?PAGE=<%=PGNM%>>最后一页</A>
<A HREF=DIS.ASP?PAGE=<%=PAGE+1%>>下一页</A>
<A HREF=DIS.ASP?PAGE=<%=PAGE-1%>>上一页</A>
引用本页地址:http://www.yongfa365.com/item/353903df2b6bb542.html