请大家帮我看看。我这程序运行后,显示最后一页时,报出以下错误。谢谢。
一、源程序:<!--#include file=Public/TurnPage.asp-->
<%
if request.cookies("flag")="" then
response.write "<script>top.location.href=""login.asp"";</script>"
response.end
end if
username=request.cookies("username")
username1=request.cookies("username1")
%>
<%
dim chaxun
chaxun=request("khh")
cx=request.cookies("cx")
id=request("id")
%>
<!--#include file="dbconn.asp"-->
<html>
<head>
<title>民生银行<%=chaxun%>客户对账单,(尊敬的客户,建议您选择体验我行网上对账服务)</title>
<LINK href="css/style.css" type=text/css rel=stylesheet>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
}
-->
</style>
<style type="text/css">
<!--
td{font-size:12px}
body{
font-size:12px;
margin-top: 0.5cm;
margin-bottom: 2cm;
margin-left: 2.5cm;
margin-right: 1cm;
}
a:link {font-size:12px; text-decoration: none; font-family: "宋体"}
a:visited {font-size: 12px; text-decoration: none; font-family: "宋体"}
a:hover {font-size: 12px; color: #009900; font-family: "宋体"; position: relative; left: 1px; top: 1px; clip: rect( )}
.h1 {font-size: 12px; line-height: 150%}
body,td,th {
color: #000000;
}
.style2 {color: #000000}
.style10 {color: #000000; font-family: "隶书"; }
.style11 {font-family: "隶书"; font-size: 14; color: #000000;}
.style12 {
font-size: 16px;
font-family: "隶书";
}
.style14 {font-family: "隶书"}
-->
</style>
</head>
<%
if cx="" or cx<>1 then
sql="select * from duizhang where khh='"&chaxun&"' and bank='"&username&"' order by xzh desc"
else
sql="select * from duizhang where khh='"&chaxun&"' order by xzh desc"
end if
set rs=server.createobject("ADODB.recordset")
rs.open sql,conn,1,1
i=1
%>
<%
sql2="select * from jigou where jigouhao='"&username&"' order by id"
set rs2=server.createobject("ADODB.recordset")
rs2.open sql2,conn,1,1
%>
<%
i=1
k=1
set rs=server.createobject("ADODB.recordset")
rs.open sql,conn,1,1
Dim RowCount
RowCount = 10 '每页显示的记录条数
tt=RowCount
Call TurnPage(Rs,RowCount)
'公共翻页模块结束%>
<table width="100%" border="0">
<tr>
<td><span class="style2">客户地址:</span><span class="style2"><%=rs("dzh")%></span></td>
</tr>
<tr>
<td><span class="style2">客户名称:</span> <span class="style2"><%=rs("hm")%></span></td>
</tr>
<tr>
<td><span class="style2">客户电话:</span> <span class="style2"><%=rs("dh")%></span></td>
</tr>
<tr>
<td><span class="style2">开户银行:</span><span class="style2">中国民生银行广州<%=rs2("jigou")%> </span></td>
</tr>
<tr>
<td><span class="style2"> 以上地址信息如有不符,请尽快与我行联系变更。</span></td>
</tr>
</table>
<div align="center" class="style12">中国民生银行银企余额对帐单
</div>
<table width="100%" border="0">
<tr>
<td><span class="style2">开户银行: 中国民生银行广州<%=rs2("jigou")%> </span></td>
</tr>
<tr>
<td><span class="style2">客户名称:</span> <span class="style2"><%=rs("hm")%></span></td>
</tr>
<tr>
<td><span class="style2">贵单位在我行开立的银行账号,截止2008年6月30日,余额如下: 单位:元 </span></td>
</tr>
</table>
<table border="" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr bordercolor="#000000" bgcolor="#CCCCCC">
<td width="60" height="28"> <div align="center" class="style10">编号</div></td>
<td width="91" height="28"> <div align="center" class="style11">开户行号</div></td>
<td width="118" height="28"> <div align="center" class="style11">客户号</div></td>
<td width="191"><div align="center" class="style11">账号</div></td>
<td width="105"><div align="center" class="style11">账号类型</div></td>
<td width="282" height="28"> <div align="center" class="style11">余额</div></td>
</tr>
<%
If Not Rs.eof then
Do while Not Rs.eof and tt>0
%>
<tr bordercolor="#000000">
<td width="60" > <div align="center"><strong><font color="#0000FF"><font color="#0000FF"><font face="Arial, Helvetica, sans-serif"><%=i%>
<%'=rs("id")%>
</font></font> </font></strong></div></td>
<td width="91" > <div align="center"><strong><%=rs("bank")%></strong></div></td>
<td width="118" ><div align="left"><strong><a href="print_dzh2.asp?khh=<%=rs("khh")%>">
<div align="left"><%=rs("khh")%></div>
</div></td>
<td width="191"><div align="left"><strong><%=rs("zhh")%></strong></div></td>
<td ><div align="center"><strong><%=rs("xzh")%></strong></div></td>
<td > <div align="left"><strong><%=rs("ye")%></strong></div> <div align="left"></div></td>
</tr>
<%
i=i+1
tt = tt - 1
Rs.MoveNext
Loop
End If
%>
</table>
<tr bordercolor="#CCCCCC">
<td height="38" colspan="6" > <span class="style2">为保证您账户资金的安全,请尽快核对。如有不符,请列差额并附清单。速与我行联系核对。核对相符后,请于十五日内在回执联上签章后,返还我行。 </span> </td>
</tr>
<tr bordercolor="#CCCCCC">
<td height="38" colspan="6" ><div align="right">
<p class="style2">银行签章 </p>
<p class="style2"> <%=date%> </p>
______________________________________________________________________________________________________________________________________________
<div align="center">
<p class="style12">中国民生银行银企余额对帐回执</p>
<table width="100%" border="0">
<tr>
<td width="600"><span class="style2">客户地址:中国民生银行广州<%=rs2("jigou")%> </span></td>
</tr>
<tr>
<td><span class="style2">客户名称:</span> <span class="style2"><%=rs("hm")%></span></td>
</tr>
<tr>
<td><span class="style2">贵单位在我行开立的银行账号,截止2008年6月30日,余额如下: 单位:元 </span></td>
</tr>
</table>
</div>
<table width="100%" border="" cellpadding="0" cellspacing="0" bordercolor="#111111" id="AutoNumber2" style="border-collapse: collapse">
<tr bordercolor="#000000" bgcolor="#CCCCCC">
<td width="60" height="28"><span class="style14">编号</span></td>
<td width="91" height="28">
<div align="center" class="style11">
<div align="center">开户行号</div>
</div></td>
<td width="118" height="28">
<div align="center" class="style11">
<div align="center">客户号</div>
</div></td>
<td width="191"><div align="center" class="style11">
<div align="center">账号</div>
</div></td>
<td width="105"><div align="center" class="style11">
<div align="center">账号类型</div>
</div></td>
<td width="282" height="28">
<div align="center" class="style11">
<div align="center">余额</div>
</div></td>
</tr>
<%
i=i-1
tt=i
If not Rs.eof then
rs.move -i
Do while Not Rs.eof and tt>0
%>
<tr bordercolor="#000000">
<td >
<div align="center"><strong><font color="#0000FF"><font color="#0000FF"><font face="Arial, Helvetica, sans-serif"><%=k%>
<%'=rs("id")%>
</font></font> </font></strong></div></td>
<td >
<div align="center"><strong><%=rs("bank")%></strong></div></td>
<td ><div align="left">
<div align="left"><strong><a href="print_dzh2.asp?khh=<%=rs("khh")%>"><%=rs("khh")%></a></strong></div>
</div></td>
<td><div align="left"><strong><%=rs("zhh")%></strong></div></td>
<td ><div align="center"><strong><%=rs("xzh")%></strong></div></td>
<td >
<div align="left"><strong><%=rs("ye")%></strong></div>
<div align="left"></div></td>
</tr>
<%
k=k+1
Rs.MoveNext
tt = tt - 1
Loop
end if
%>
<%
rs.close
set rs=nothing
%>
</table>
</div></td>
</tr>
<table width="100%" border="0">
<tr>
<td colspan="2"><span class="style2">经核对:( )余额相符 </span></td>
</tr>
<tr>
<td colspan="2"><span class="style2"> ( )余额不相符,详见“未达账款项调节表” </span></td>
</tr>
<tr>
<td height="57"><span class="style2">单位核对签章:(公章或预留银行印鉴) </span></td>
<td><div align="right"><span class="style2">银行签章</span></div></td>
</tr>
<tr>
<td width="62%"><span class="style2"> 对账人: 联系电话:</span></td>
<td width="38%"><div align="right"><span class="style2"><%=date%></span></div></td>
</tr>
</table>
</body>
</html>
二、报错的信息
无法显示网页
试图访问的网页出现问题,无法显示。
--------------------------------------------------------------------------------
请尝试执行下列操作:
单击刷新按钮,或稍后重试。
打开 198.20.2.31 主页,然后查找与所需信息相关的链接。
HTTP 错误 500.100 - 内部服务器错误 - ASP 错误
Internet 信息服务
--------------------------------------------------------------------------------
技术信息(用于支持人员)
错误类型:
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/gl/print_dzh.asp
浏览器类型:
Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; WPS; Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1) ; .NET CLR 1.1.4322)
网页:
POST 18 ??? /gl/print_dzh.asp
POST Data:
PageNo=3&Submit=Go
时间:
2008年11月26日, 13:37:02
三、程序中包含分页程序的代码:
<%
Sub TurnPage(ByRef Rs_tmp,PageSize) 'Rs_tmp 记录集 ; PageSize 每页显示的记录条数;
Dim TotalPage '总页数
Dim PageNo '当前显示的是第几页
Dim RecordCount '总记录条数
Rs_tmp.PageSize = PageSize
RecordCount = Rs_tmp.RecordCount
TotalPage = INT(RecordCount / PageSize * -1)*-1
PageNo = Request.QueryString ("PageNo")
'直接输入页数跳转;
If Request.Form("PageNo")<>"" Then PageNo = Request.Form("PageNo")
'如果没有选择第几页,则默认显示第一页;
If PageNo = "" then PageNo = 1
If RecordCount <> 0 then
Rs_tmp.AbsolutePage = PageNo
End If
'获取当前文件名,使得每次翻页都在当前页面进行;
Dim fileName,postion
fileName = Request.ServerVariables("script_name")
postion = InstrRev(fileName,"/")+1
fileName = Mid(fileName,postion)
%>
<table border=0 width='97%'>
<tr>
<td width="333" align=left> 总页数:<font color=#ff3333><%=TotalPage%></font>页
当前第<font color=#ff3333><%=PageNo%></font>页 总共<%=RecordCount%>账户</td>
<td width=270><form name="form1" method="post" action=""> 转到第 <% If TotalPage = 1 Then%>
<input type=text name=PageNo size=3 readonly disabled style="background:#d3d3d3">
<input type="submit" name="Submit" value="Go" disabled style="background:#d3d3d3">
<%Else%>
<input type=text name=PageNo size=3 >
<input type="submit" name="Submit" value="Go">
<%End If%>
页
</form>
</td>
</tr>
</table>
<%End Sub%>
[[it] 本帖最后由 心海潮汐 于 2008-11-26 14:00 编辑 [/it]]