注册 登录
编程论坛 ASP技术论坛

求高手帮忙看看啊~!!ADODB.Field (0x800A0BCD)先谢谢啦

haoshuangkun 发布于 2011-01-31 18:11, 636 次点击
错误类型:
ADODB.Field (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
/web/6.asp, 第 35 行

<td width="383"><%=(Recordset1.Fields.Item("t_id").Value)%></td>第 35 行



<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="Connections/coon.asp" -->
<%
Dim Recordset1__MMColParam
Recordset1__MMColParam = "1"
If (Request.Form("t_name") <> "") Then
  Recordset1__MMColParam = Request.Form("t_name")
End If
%>
<%
Dim Recordset1
Dim Recordset1_numRows

Set Recordset1 = Server.CreateObject("ADODB.Recordset")
Recordset1.ActiveConnection = MM_coon_STRING
Recordset1.Source = "SELECT * FROM t_book WHERE t_name = '" + Replace(Recordset1__MMColParam, "'", "''") + "'"
Recordset1.CursorType = 0
Recordset1.CursorLocation = 2
Recordset1.LockType = 1
Recordset1.Open()

Recordset1_numRows = 0
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.
<html xmlns="http://www.
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>

<body>
<table width="501" height="325" border="1">
  <tr>
    <td width="102">编号</td>
    <td width="383"><%=(Recordset1.Fields.Item("t_id").Value)%></td>
  </tr>
  <tr>
    <td>姓名</td>
    <td><%=(Recordset1.Fields.Item("t_name").Value)%></td>
  </tr>
  <tr>
    <td>性别</td>
    <td><%=(Recordset1.Fields.Item("t_sex").Value)%></td>
  </tr>
  <tr>
    <td>电话</td>
    <td><%=(Recordset1.Fields.Item("t_dianhua").Value)%></td>
  </tr>
  <tr>
    <td height="54">地址</td>
    <td><%=(Recordset1.Fields.Item("t_dizhi").Value)%></td>
  </tr>
  <tr>
    <td height="46">电子邮件</td>
    <td><%=(Recordset1.Fields.Item("t_email").Value)%></td>
  </tr>
  <tr>
    <td>关系</td>
    <td><%=(Recordset1.Fields.Item("t_guanxi").Value)%></td>
  </tr>
</table>
</body>
</html>
<%
Recordset1.Close()
Set Recordset1 = Nothing
%>
2 回复
#2
dzt00012011-01-31 20:10
记录集为空
#3
魏兴耀2011-02-07 16:46
你这个不是一个文件在这里吧,貌似还是用的是DW自带的软件生成的代码,检查一下IF语句和SQL语句,问题就在那里
1