<!--#include file="conn.asp"-->
<!--#include file="conn4.asp"-->
<%
Set rs1 = server.CreateObject("adodb.recordset")
slq = "select * from only order by Tijianshijian desc"
response.write slq
rs1.Open slq,dd,1,1 (出错代码行)
Dim pagenum
rs1.pagesize =1 '每页显示记录的条数
pagecount1 = rs1.pagecount '总共显示的页数
'获取当前的页码数,放到变量pagenum中
If request.querystring("pagenum") = 0 Or request.querystring("pagenum") = "" Then
pagenum = 1
Else
pagenum = request.querystring("pagenum")
rs1.absolutepage = Trim(request.querystring("pagenum")) '记录集的absolutepage属性表示当前显示的弟几页
End If
%>
<%Do While Not rs.EOF And i < rs1.pagesize%>
<tr>
<td width="55" height="20" align="center"><%=rs("Tijiandanhao")%></td>
<td width="54" height="20" align="center"><%=rs("Tijianshijian")%></td>
<td width="59" height="20" align="center"><%=replace(rs("xin")&"",",","")%></td>
</tr>
<tr>
<%
i=i+1
rs.movenext
loop
%>
</tr>
</table>
<p align="center">[<a href=viewrecord.asp?pagenum=1>首页</a>
<%If pagenum > 1 Then%>
<a href=viewrecord.asp?pagenum=<%=(pagenum-1)%>>上一页</a>
<%Else%>
上一页
<%pagenum=1%>
<%End If%>
<%If pagenum < Trim(pagecount1) Then%>
<a href=viewrecord.asp?pagenum=<%=(pagenum+1)%>>下一页</a>
<%Else%>
下一页
<%pagenum=pagecount1%>
<%End If%>
<a href=viewrecord.asp?pagenum=<%=pagecount1%>>尾页</a>]
[页次:<%=pagenum%>/<%=pagecount1%>页] [每页显示<%=rs.pagesize%>条记录/<%=rs.recordcount%>总共条记录]
</p>