asp中,我的rs.pagecount总是为1呢

来源:百度知道 编辑:UC知道 时间:2024/05/29 19:03:28
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--#include file="../conn.asp"-->
<%
<!--#include file="check.asp"-->
%>
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>管理员信息</title>
</head>
<%
sql="select * from admin order by setdate asc "
'set rs =conn.execute(sql)
set rs= server.CreateObject("adodb.recordset")
rs.open sql,conn,1,1

用do while not rs.eof

rs.movenext
loop
试试

因为select * from admin order by setdate asc永远都是一页!

rs.cursorlocation=3
rs.open strsql,conn,3,1

根据你贴出的代码,你好像没有分页的意思吧?rs.count才是表示记录数~
for i=0 to rs.pagecount改成
for i=1 to rs.count
不过最好还是用do loop~