dnf90冰洁异界套选择:请教一下各位大侠这段代码有什么问题??

来源:百度文库 编辑:高考问答 时间:2024/05/02 06:43:36
是翻页功能出现错误:
错误类型:
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/kuoo8/mm/class.asp

源代码如下:

<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="eeeeee">
<tr>
<form name="pa" method="post" action="">
<td width="70%" height="20" align="right" valign="middle" class="font">共<font color="#FF2D00">[<%=rc.RecordCount%>]</font>条 今日更新<font color="#FF2D00">[<%=todayRecord%>]</font>条
分<font color="#FF2D00"><%=rc.pagecount%></font>页 <font color="#FF2D00"><%=rc.pagesize%></font>条/页
当前第<font color="#FF2D00"><%=Page%></font>页 <a href="?Page=1">首页</a>
<%if Page>1 then%>
<a href="?class=<%=rc("News_Class")%>&Page=<%=Page-1%>">上页</a>
<%else%>
上页
<%end if%>
<%if Page < rc.pagecount then %>
<a href="?class=<%=rc("News_Class")%>&Page=<%=Page+1%>">下页</a>
<%else%>
下页
<%end if%>
<a href=?Page=<%=rc.pagecount%>>尾页</a>
<input name="Page" type="text" class="input" id="Page" value="<%=Page%>" size="3">
<input name="Submit2" type="submit" class="button" value="转到该页">
</td>
</form>
</tr>
</table>

请问要怎么改,谢谢!

在读取查询结果时,先判断一下是否查询结果不为空if not(rc.eof and rc.bof) then
比如这句:rc("News_Class"),如果查询结果记录数为0,就会报你说的错误

实际您的出错的代码没有,无法判别