BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录

<!--#includefile="conn.asp"--><html><head><metahttp-equiv="Content-Type"content="text... <!-- #include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员资料修改</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url();
background-repeat: no-repeat;
}
.STYLE1 {color: #FF0000}
-->
</style></head>
<body>
<%
set rst=server.CreateObject("adodb.recordset")
%>
<table width="800" height="573" border="0" align="center" cellspacing="0">
<tr>
<td height="573" align="center" valign="top" background="img/hyzlxg.jpg"><table width="800" border="0" cellspacing="0">
<tr>
<td width="73" height="164"> </td>
<td width="646"> </td>
<td width="75"> </td>
</tr>
<tr>
<td height="337"> </td>
<td align="center" valign="middle" bgcolor="#F9F9F9"><a href="admin.asp">返回会员列表</a>
<%rst.open "select * from [user] where u_num='" & request.querystring("num") & "'",conn,1,1%>
<form id="form1" name="form1" method="post">
<table width="90%" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<td colspan="3">请在下面修改会员资料,红色<span class="STYLE1">*</span>号所标示的选项为必填项</td>
</tr>
<tr>
<td width="24%" align="right">用户名:</td>
<td width="37%" align="left"><input name="f_user" type="text" id="f_user" value="<%=rst("u_user")%>" /></td>
<td width="39%" align="left"><span class="STYLE1">*
</span></td>
</tr>
<tr>
<td align="right">密码:</td>
<td align="left"><input name="f_code" type="text" id="f_code" value="<%=rst("u_pwd")%>"/></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<%rst.close
rst.open "select * from info where i_num='" & request.querystring("num") & "'",conn,1,1
%>
<tr>
<td align="right">姓名:</td>
<td align="left"><input name="f_name" type="text" id="f_name" value="<%=rst("i_name")%>"/></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">性别:</td>
<td align="left"><select name="f_sex" id="f_sex">
<option value="man" selected="selected">男</option>
<option value="woman"<%if rst("i_sex")="woman" then response.Write "selected"%>>女</option>
</select> </td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">年龄:</td>
<td align="left"><input name="f_age" type="text" id="f_age" size="8" value="<%=rst("i_age")%>"/></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr><%rst.close%>
<td colspan="3" align="center"><input type="submit" name="Submit" value="修改会员资料" />
   
<input type="reset" name="Submit2" value="重置表单" /></td>
</tr>
</table>
</form>
</td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<%set rst=nothing
conn.close
set conn=nothing
%>
</body>
</html>

错误类型:
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/modify.asp
我的表中明明是有数据的,怎么还会报这个错啊,请高手帮忙看看
展开
 我来答
火舞娇洋
推荐于2016-01-21 · TA获得超过1202个赞
知道小有建树答主
回答量:600
采纳率:0%
帮助的人:0
展开全部
应该是个会员资料修改页面.
说的不是很详细,你把所调用的数据仔细查一下,是否有不存在的数据被调用.
而且request.querystring("num")是否存在.
应该加个判断
if rst.eof then
response.write "暂且没有资料…"
else
==============================

<!-- #include file="conn.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>会员资料修改</title>
<style type="text/css">
<!--
body {
margin-top: 0px;
margin-bottom: 0px;
background-image: url();
background-repeat: no-repeat;
}
.STYLE1 {color: #FF0000}
-->
</style></head>
<body>
<%
set rst=server.CreateObject("adodb.recordset")
%>
<table width="800" height="573" border="0" align="center" cellspacing="0">
<tr>
<td height="573" align="center" valign="top" background="img/hyzlxg.jpg"><table width="800" border="0" cellspacing="0">
<tr>
<td width="73" height="164"> </td>
<td width="646"> </td>
<td width="75"> </td>
</tr>
<tr>
<td height="337"> </td>
<td align="center" valign="middle" bgcolor="#F9F9F9"><a href="admin.asp">返回会员列表</a>
<%rst.open "select * from [user] where u_num='" & request.querystring("num") & "'",conn,1,1
if rst.eof then
response.write "暂且没有资料…"
else
%>
<form id="form1" name="form1" method="post">
<table width="90%" border="1" align="center" cellpadding="5" cellspacing="0">
<tr>
<td colspan="3">请在下面修改会员资料,红色<span class="STYLE1">*</span>号所标示的选项为必填项</td>
</tr>
<tr>
<td width="24%" align="right">用户名:</td>
<td width="37%" align="left"><input name="f_user" type="text" id="f_user" value="<%=rst("u_user")%>" /></td>
<td width="39%" align="left"><span class="STYLE1">*
</span></td>
</tr>
<tr>
<td align="right">密码:</td>
<td align="left"><input name="f_code" type="text" id="f_code" value="<%=rst("u_pwd")%>"/></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<%
end if
rst.close
rst.open "select * from info where i_num='" & request.querystring("num") & "'",conn,1,1
if rst.eof then
response.write "暂且没有资料…"
else
%>
<tr>
<td align="right">姓名:</td>
<td align="left"><input name="f_name" type="text" id="f_name" value="<%=rst("i_name")%>"/></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">性别:</td>
<td align="left"><select name="f_sex" id="f_sex">
<option value="man" selected="selected">男</option>
<option value="woman"<%if rst("i_sex")="woman" then response.Write "selected"%>>女</option>
</select> </td>
<td align="left"><span class="STYLE1">*</span></td>
</tr>
<tr>
<td align="right">年龄:</td>
<td align="left"><input name="f_age" type="text" id="f_age" size="8" value="<%=rst("i_age")%>"/></td>
<td align="left"><span class="STYLE1">*</span></td>
</tr><%
end if
rst.close%>
<td colspan="3" align="center"><input type="submit" name="Submit" value="修改会员资料" />

<input type="reset" name="Submit2" value="重置表单" /></td>
</tr>
</table>
</form>
</td>
<td> </td>
</tr>
</table></td>
</tr>
</table>
<%set rst=nothing
conn.close
set conn=nothing
%>
</body>
</html>
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式