高手进来看看ASP代码那里出错

来源:百度知道 编辑:UC知道 时间:2024/06/02 00:38:38
<%
page=cint(request.querystring("page"))
set conn=server.createobject("ADODB.connection")
conn.open "driver={SQL server};database=student;server=(local);uid=;pwd="
set rs=server.createobject("ADODB.recordset")
rs.open "liuyanban",conn,1,1
rs.pagesize=5

if page<=0 then page=1
if page>rs.pagecount then page=rs.pagecount

rs.absolutepage=page
%>

<html>
<head><title>查看留言</title></head>
<body>
<center>
<table width="57%" height="195" border="1" cellspacing="0" bordercolor="#0099CC" background="3.jpg">
<%i=1
do while not rs.eof
%>
<th height="24" colspan="5">留言日期:
<% =rs("l_addtime") %></th>
</tr>
<tr>

这条语句是将返回查询结果中的rs.absolutepage赋值为PAGE,这个好像不能这么赋值啊,如果为PAGE赋值也是前后颠倒了啊!而且好像后面的没有这个存在的必要,删除掉就是 ,还有前面的rs.pagesize=5,这个也没清楚干嘛用的!