求助:ASp中记录按列显示并分页程序
记录按列显示,并分页,怎么做啊?<%
set conn=server.CreateObject("adodb.connection")
conn.connectionstring="dbq="&server.MapPath("../test.mdb")&";driver={Microsoft Access Driver (*.mdb)}"
conn.open
%>
<html >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<%set rs=server.CreateObject("adodb.recordset")
sql="select * from carinfo2"
rs.open sql,conn,3,2
dim arr()
redim arr(rs.fields.count)
if not (rs.eof and rs.bof) then
dim page_no
if request.QueryString("page_no")="" or request.QueryString("page_no")=0 then
page_no=1
else
page_no=cint(request.QueryString("page_no"))
end if
if page_no>rs.pagecount then page_no=rs.pagecount
rs.pagesize=4
rs.absolutepage=page_no
dim j,k
j=rs.pagesize
k=rs.pagesize
%>
<table border="1">
<%
For i=0 to rs.fields.count-4
response.Write "<tr>"
for j=1 to rs.pagesize
str=rs(i)
%>
<td align="center"><%=str%></td>
<%
rs.movenext
next%></tr>
<%
rs.movefirst
Next%>
<% response.Write "<tr>"
for j=1 to rs.pagesize
str=rs(rs.fields.count-3)
%>
<td align="center"><img name="" src="<%=str%>" width="150" height="80" alt=""></td>
<%
rs.movenext
next%></tr>
<%
else
response.Write("<p><center><font color='CC0000'>尚没有案例!!</font></center>")
end if
%>
</table>
<table width="420" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" align="center" valign="bottom">
<span class="STYLE1">
<%
if request.QueryString("page_no")="" or request.QueryString("page_no")=0 then
page_no=1
else
page_no=cint(request.QueryString("page_no"))
end if
%>
<a href="anlie.asp?page_no=1" class="news">首页</a>
<%
if page_no=1 then
'else%><a href="anlie.asp?page_no=<%=1%>" class="news">上一页</a>
<%else%>
<a href="anlie.asp?page_no=<%=page_no-1%>" class="news">上一页</a>
<%end if%>
<%if page_no>=rs.pagecount then
page_no=rs.pagecount%>
<a href="anlie.asp?page_no=<%=page_no%>" class="news">下一页</a>
<%else%>
<a href="anlie.asp?page_no=<%=page_no+1%>" class="news">下一页</a>
<%end if%>
<a href="anlie.asp?page_no=<%=rs.pagecount%>" class="news">尾页</a>
<span class="STYLE2">当前<%=page_no%>页/共<%=rs.pagecount%>页</span></span></td>
<%
%>
</tr>
</table>
</body>
</html>
实现了按列显示,但是分页不成功啊