男兵体检项目:ADODB.Field (0x80020009) BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除...

来源:百度文库 编辑:查人人中国名人网 时间:2024/05/09 11:03:59
提示的是这个
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

两个文件如下:

* mdfmdct.asp:

<!-- #include file="conn.asp" -->

<% exec="select * from medica where name='"&request("name")&"'"
set rs=server.CreateObject("adodb.recordset")
rs.open exec,conn

%>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改药品</title>
</head>

<body>
<form name="mdfform" method="post" action="actmdf.asp">
<p> </p>
<p>药品名称:
<input name="name" type="text" value="<% =request("name")%>" size="26" />
</p>
<p>药品图片:
<input name="img" type="text" value="<% =rs("img")%>" size="26" />
</p>
<p>药品说明:</p>
<p>
<textarea name="ps" cols="40" rows="5"><% =rs("ps")%>
</textarea>
</p>
<p>

<input type="submit" name="Submit" value="确定修改" />
<input type="reset" name="Submit2" value="重置" />
</p>
</form>

<% rs.close
set rs=nothing
conn.close
set conn=nothing

%>

</body>
</html>

* actmdf.asp:

< !-- #include file="conn.asp" -->

<% exec="select * from medica where name="request.Form("name")"
set rs=server.CreateObject("adodb.recordset")
rs.open exec,conn,1,3

rs("name")=request.Form("name")
rs("img")=request.Form("img")
rs("ps")=request.Form("ps")
rs.update

rs.close
set rs=nothing
conn.close
set conn=nothing

%>

帮我看看为什么不能运行,就是要修改操作!

谢谢了!

可以再具体一点吗

或者具体修改一下代码 多谢!

路过 我也遇到过这问题。