cf试炼挑战奖励:ASP错误求助!ADODB.Field (0x800A0BCD)

来源:百度文库 编辑:神马品牌网 时间:2024/04/28 05:48:24
错误类型:
ADODB.Field (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/send.asp, 第 1066 行

部分源代码如下:
<!--#include file=conn.asp-->
<%if session("person")="" then
response.write"<script>alert('对不起,您未登录!');window.navigate('login.asp');</script>"
end if
%>
<html>
<head>

</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="22%"> </td>
<td><span class="f14"><img src="img/tips.gif" width="16" height="16"></span>请您选择正确的分类,以使您的问题尽快得到解答。</td>
</tr>
</table>
<br><%
rs2.open"select * from person where name='"&session("person")&"'",conn,1,1
jifen=rs2("jifen") 第1066行
rs2.close
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" >
<tr>

当rs2的记录为空时,jifen=rs2("jifen") 是错误的,应该这么写
if not rs2.eof and not rs2.bof then
jifen=rs2("jifen")
end if

怎么么没有看到
set rs2=.........