<!--#include file="include/conn.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>管理员查询</title>
<link href="css/yangshi.css" rel="stylesheet" type="text/css">
<!--#include file="top.asp"-->
<!--#include file="include/function.asp"-->
<%
if session("powerss")<>1 and session("powerss")<>2 then
response.Redirect "admin_manage.asp"
response.End()
end if
i=request.Form("num")
radio=request.Form("radiobutton")
checkname=request.Form("check")
check=split(checkname,",")
if radio="" or check(i)="" then
response.Redirect "admin_bo_checkborrow.asp"
response.End()
end if
dim sqlstr
select case cint(radio)
case 1
sqlstr="select * from book_borrow where stunum='"&check(i)&"'"
case 2
sqlstr="select * from book_borrow where booknum='"&check(i)&"'"
end select
'survey(sqlstr)
set rs=server.CreateObject("adodb.recordset")
rs.open sqlstr,conn,3,1
filename="admin_ac_checkborrow.asp"
pageno=cint(request("pageno"))
rs.pagesize=5
recordcount=rs.recordcount
pagecount=cint(rs.pagecount)
if pageno>=pagecount then
pageno=pagecount
end if
if IsEmpty(pageno) or pageno<1 then
pageno=1
end if
'response.Write pageno
'response.Write recordcount
'response.Write pagecount
'response.Write rs.pagesize
'response.End()
rs.absolutepage=pageno '提示这里错误.错误类型:ADODB.Recordset (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
%>
<table width="40%" border="0" align="center">
<tr>
<td><div align="center" class="style4">查询结果</div></td>
</tr>
</table>
<table width="80%" height="26" border="0" align="center">
<tr bgcolor="#FFDAB9">
<td><div align="center">书号</div></td>
<td><div align="center">书名</div></td>
<td><div align="center">学生号</div></td>
<td><div align="center">学生名</div></td>
<td><div align="center">借阅日期</div></td>
</tr>
</table>
<%
do while not rs.eof
sqlstr1="select * from book_borrow where booknum='"&check(i)&"'"
response.Write sqlstr1
'response.End()
stunum=rs("stunum")
sqlstr2="select * from stu_info where stunum='"&stunum&"'"
set cs=server.CreateObject("adodb.recordset")
cs.open sqlstr2,conn,1,1
response.Write sqlstr2
'response.End()
%>
<table width="80%" height="26" border="0" align="center">
<tr bgcolor="#FFDAB9">
<td width="15%" bgcolor="#E3F1D1"><div align="center"><%=rs("booknum")%></div></td>
<td width="15%" bgcolor="#F4FAED"><div align="center"><%=rs("bookname")%></div></td>
<td width="21%" bgcolor="#F4FAED"><div align="center"><%=rs("stunum")%></div></td>
<td width="21%" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><div align="center"><%=cs("stuname")%></div></td>
<td width="28%" bgcolor="#FFFFFF"><div align="center"><%=rs("borrow_date")%></div></td>
</tr>
</table>
<%
rs.movenext
loop
cs.close
set cs=nothing
rs.close
set rs=nothing
%>
<table width="80%" border="0" align="center">
<tr>
<td><div align="right"><%call page(filename,pageno,pagecount)%></div></td>
</tr>
</table>
我用response.write输出pageno,pagecount都没问题,请帮看看吧~头都大了~谢谢了!!