注册 登录
编程论坛 SQL Server论坛

错误类型:ADODB.Field (0x80020009)BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

影子和超子 发布于 2010-12-26 18:03, 663 次点击
代码:<!--#include file="dataconn2.asp"-->
<% Response.buffer=true %>
<%set data3=server.createobject("adodb.recordset")
sq_3="select * from msg_book where id="&int(request("id"))
data3.open sq_3,conn,1,3
%>
<% Select case Request.QueryString("op")
   Case "reply_msg"
   Call reply_msg()
   Case else
   Call disp_msg()
   End Select
%>
<%sub disp_msg()%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>留言内容</title>
<style type="text/css">
<!--
body,td,th {font-family: 宋体, Arial;
            font-size: 12px;}
body {margin-left: 0px;
      margin-top: 0px;
      margin-right: 0px;
      margin-bottom: 0px;}
a {font-size: 12px;}
a:link {text-decoration: none;}
a:visited {text-decoration: none;}
a:hover {text-decoration: none;}
a:active {text-decoration: none;}
-->
</style>
<style fprolloverstyle>A:hover {color: #000000; font-size: 12px; font-family: 宋体}
</style>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
<div align="center">
<br>
<table cellpadding="0" cellspacing="0" width="617" height="258">
<tr>
<td height="17" valign="top">
<b>昵称:<%=data3("nick_name")%>&nbsp;&nbspOICQ:<%=data3("oicq")%><%if data3("oicq")="" then response.write"未填写" end if%>&nbsp;&nbsp来自:<%=data3("pvc")%></b></td>
</tr>
<tr>
<td height="18" valign="top" bgcolor="#E6E6E6">
<b>留言主题:<%=data3("title")%></b></td>
</tr>
<tr>
<td height="218" valign="top" width="617">
<form name="FORM" method="POST" action="disp_msg.asp?op=reply_msg&id=<%=data3("id")%>"><br>
<table cellpadding="0" cellspacing="0" width="616" height="146" border="1">
<tr>
<td height="18" width="314" bgcolor="#E6E6E6">
<p align="center"><b>回复留言</b></td>
<td height="18" width="314" bgcolor="#E6E6E6">
<p align="center"><b>留言内容</b></td>
</tr>
<tr>
<td height="122" width="314" valign="bottom">
<textarea rows="10" name="contents" cols="49"  style="border: 1px  #FFFFFF; font-size:12px; font-family:宋体"></textarea></td>
<td height="18" valign="top">
<%=data3("contents")%></td>
</tr>
</table>
<tr>
<td><input type="submit" value="提交" name="B1"><input type="reset" value="重置" name="B2"></td>
</tr>
</form>
</tr>
</table>
</div>
</body>
</html>
<%end sub%>
<%sub reply_msg()
data3("reply")=request.form("contents")
data3.update
response.Redirect "index.asp"
end sub%>
<% data3.close
  set data3=nothing
  conn.close
  set conn=nothing%>

2 回复
#2
juejitianya2010-12-28 08:57
这类的问题在数据库板块很难得到答案的,你可以尝试着去相应的编程语言板块去找一些高手帮忙。
#3
cnfarer2010-12-28 11:10
应当时data3没查到记录
1