ztjal |
2005-09-11 00:52 |
第一次就用ADO来分页吧,以后再学SQL存储过程分页,或者JAVASCRIPT XML分页吧.
下面是ADO的分页例子. <%
Const pagenum = 5
i=request("page")
Set rs = Server.CreateObject("ADODB.Recordset") sql = "select * from [表名] order by [什么] desc" rs.open sql,conn,1,1
rs.pagesize = pagenum '定义每页显示多少条数据,
rs.absolutepage=i '定义当前是第几页,想像力来了吗?
for j=1 to rs.pagesize response.write(rs("字段")) rs.movenext if rs.eof then exit for next
rs.close set rs = nothing
%> |
|