ASP出错,错误类型:ADODB.Field (0x800A0BCD)

ADODB.Field(0x800A0BCD)BOF或EOF中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录错误在34行<%@LANGUAGE="J... ADODB.Field (0x800A0BCD)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录
错误在34行
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/selsys.asp" -->
<%
var Recordset1_cmd = Server.CreateObject ("ADODB.Command");
Recordset1_cmd.ActiveConnection = MM_selsys_STRING;
Recordset1_cmd.CommandText = "SELECT cust_name FROM dbo.custmers";
Recordset1_cmd.Prepared = true;

var Recordset1 = Recordset1_cmd.Execute();
var Recordset1_numRows = 0;
%>
<%
var Recordset2_cmd = Server.CreateObject ("ADODB.Command");
Recordset2_cmd.ActiveConnection = MM_selsys_STRING;
Recordset2_cmd.CommandText = "SELECT password FROM dbo.custmers";
Recordset2_cmd.Prepared = true;

var Recordset2 = Recordset2_cmd.Execute();
var Recordset2_numRows = 0;
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>login</title>
</head>

<body>
<form action=-quedbo.custmersry method=POST>

用户名:<input name=姓名 type=text value="<%=(Recordset1.Fields.Item("cust_name").Value)%>" size="12" ><br>
密码::
<input name=密码 type=text value="<%=(Recordset2.Fields.Item("password").Value)%>" size="12"><br>
验证码:
<input name=验证码 type=text size="6"><br>
<img src="code.asp"><br>
<input name="" type=button value="登陆">
<input type=button value="注册" />
<input type=button value="忘记密码" />
<br><br>
</form>
</body>
</html>
<%
Recordset1.Close();
%>
<%
Recordset2.Close();
%>

34行:用户名:<input name=姓名 type=text value="<%=(Recordset1.Fields.Item("cust_name").Value)%>" size="12" ><br>

请问要修改些什么呢,因为数据库没有记录·

分数比较少,明天给你加分
Microsoft JScript 编译错误 (0x800A03EC)
缺少 ';'
/网站/login.asp, line 11, column 3
If not(Recordset1.bof and Recordset1.eof) Then
--^
展开
 我来答
windscar
2009-09-03 · TA获得超过610个赞
知道小有建树答主
回答量:1559
采纳率:0%
帮助的人:601万
展开全部
<%@LANGUAGE="JAVASCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/selsys.asp" -->
<%
var Recordset1_cmd = Server.CreateObject ("ADODB.Command");
Recordset1_cmd.ActiveConnection = MM_selsys_STRING;
Recordset1_cmd.CommandText = "SELECT cust_name FROM dbo.custmers";
Recordset1_cmd.Prepared = true;

var Recordset1 = Recordset1_cmd.Execute();
var Recordset1_numRows = 0;
If not(Recordset1.bof and Recordset1.eof) Then
%>
<%
var Recordset2_cmd = Server.CreateObject ("ADODB.Command");
Recordset2_cmd.ActiveConnection = MM_selsys_STRING;
Recordset2_cmd.CommandText = "SELECT password FROM dbo.custmers";
Recordset2_cmd.Prepared = true;

var Recordset2 = Recordset2_cmd.Execute();
var Recordset2_numRows = 0;
If not(Recordset2.bof and Recordset2.eof) Then
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>login</title>
</head>

<body>
<form action=-quedbo.custmersry method=POST>

用户名:<input name=姓名 type=text value="<%=(Recordset1.Fields.Item("cust_name").Value)%>" size="12" ><br>
密码::
<input name=密码 type=text value="<%=(Recordset2.Fields.Item("password").Value)%>" size="12"><br>
验证码:
<input name=验证码 type=text size="6"><br>
<img src="code.asp"><br>
<input name="" type=button value="登陆">
<input type=button value="注册" />
<input type=button value="忘记密码" />
<br><br>
</form>
</body>
</html>
<%
end if
Recordset2.Close();
%>
<%
end if
Recordset1.Close();
%>
试试
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

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

类别

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

说明

0/200

提交
取消

辅 助

模 式