hc08蓝牙模块资料:BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

来源:百度文库 编辑:高校问答 时间:2024/04/26 17:59:21
<!--#include file=up.asp-->
<!-- #include file=pet_conn.asp -->
<!--#include file=pet_config.asp-->

<%
dim menu,savem,rsbank,rssql,chentitle,chenbackasp,stats,errmsg,founderr,action,founduser,rs1,userid

founduser=false
if not conn.execute("select name from [user] where name='"&lgname&"' and password='"&lgpwd&"' and not del").eof then founduser=true
if not founduser then
response.redirect "login.asp"
else
dim allpetpeople,mypetname,mypet,levelpic,mypetlevel,username
Dim SQL
SQL = "SELECT username,mypet,mypetlevel,mypetname FROM mypetdata ORDER BY mypetexp DESC"
set rs = connpet.execute(SQL)
if rs.eof then
call showmessage("社区还没有宠物啊,抢先去买一个吧~","pet_shop.asp")
else
username = rs("username")
set rs1 = conn.execute("select userid from [user] where name='"&rs("username")&"'")
userid = rs1("userid")
rs1.close
mypet = rs("mypet")
mypetlevel = rs("mypetlevel")
mypetname = rs("mypetname")

levelpic = int(mypetlevel/10)
if levelpic>10 then levelpic=11 end if
end if
rs.close

SQL = "SELECT COUNT(mypetexp) FROM mypetdata "
rs.open SQL,connpet,1,3
allpetpeople = rs(0)
rs.close

%>
<table width="<%=tbw%>" border="0" cellspacing="1" cellpadding="5" align="center" class=TBone>
<tr>
<td height=27 align="center" class=tbhead2><b><font class=HeadFont><%=stats%></font></b></td>
</tr>
<tr>
<td class=tbbg1>

<table width="90%" border="0" align="center" cellpadding="4" cellspacing="4">
<tr>
<td width="34%"><div align="center"> 本社区共有 <%=allpetpeople%> 只宠物宝宝<br><br>
</div>
<!-- #include file=pet_nav.asp -->
</td>
<td width="66%">
<div align="center"></div>
<div align="center"><font color="#FF0000">  </font>

<table width='100%' border='0' cellspacing='2' cellpadding='0'>
<tr><td colspan='2'><div align='center'>宠物明星</div></td></tr>
<tr><td width='41%' rowspan='3'><div align='center'><IMG src='images/pet/<%=mypetname%>/<%=mypetname%><%=levelpic%>.gif'></div></td><td width='59%'>宠物名字:<%=mypet%></td>
</tr><tr><td>宠物等级:<%=mypetlevel%></td>
</tr><tr><td>宠物主人:<a href="Userinfo.asp?userid=<%=userid%>"><%=username%></a></td>
</tr></table>

<font color="#FF0000"> </font></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div>
<div align="center"></div></td>
</tr>
</table>

</td></tr></table>

<%
end if

down
%>

就是返回的记录集的指针见底(EOF=True)或见头(BOF=True)了,不过看你的代码没有任何指针操作语句,说明你SQL查询的表中符合条件的记录是没有的。

表中没有数据或者没有满足条件的数据,也就是你的记录集为空了

最好能补充一下,问题出在第几行,你可以用Response.End()来查找出错的行,这个出错提示是查找语句没有找到对应的记录,你没有判断直接操作记录,产生的错误