帮忙调试一下
帮忙调试一下翻页这个功能,我写的程序是这样的,但翻不了页,读取不了ID,我上传了原文件和数据库,希望那个高手帮我调试一下再发上来谢谢~~~~~~~~~~~~~<body>
<%name=request.QueryString("id")
Set conn=server.CreateObject("adodb.connection")
crt="provider=Microsoft.JET.OLEDB.4.0;Data Source="&Server.MapPath("shuju.mdb")
conn.open crt
set rs=server.createobject("adodb.recordset")
select case name
case "new"
rs.open"select * from new ",conn,1,1
case "new2"
rs.open"select * from new2 ",conn,1,1
case else
rs.open"select * from new ",conn,1,1
end select
dim zongye,page,coun
rs.pagesize=15
zongye=rs.pagecount
page=trim(request.querystring("page"))
if page="" then page=1
if not isnumeric(page) then page=1
page=cint(page)
if page<1 then page=1
if zongye<1 then zongye=1
if page>zongye then page=zongye
rs.absolutepage=page
if rs.bof and rs.eof then
response.write("没有任何新闻")
else
rs.absolutepage=page
js=rs.pagesize
do while not rs.eof and js>0%>
<%=rs("title")%>
<%js=js-1
rs.movenext
loop
end if %>
<table>
<tr>
<td width="45"><a href="1.asp?<%=zongye-(zongye-1)%>&name=<%=name%>">第一页</a></td>
<td width="45"><a href="1.asp?page=<%= page-1%>&name=<%=name%>">上一页</a></td>
<td width="45"><a href="1.asp?page=<%= page+1%>&name=<%=name%>">下一页</a></td>
<td width="49"><a href="1.asp?page=<%=zongye%>&name=<%=name%>">最后一页</a></td>
</tr></table>
</body>
cs2.rar
(26.09 KB)