出现“ADODB.Field 错误 '800a0bcd' BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。 /order_ch.asp,行 54”的错
ADODB.Recordset(0x800A0BCD)-->rs对像出错(记录集中没有记录却对记录集进行操作)
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Connections/web_ljdata.asp" -->
<%
Dim pro__MMColParam
pro__MMColParam = "1"
If (Request.Form("pro_id") <> "") Then
pro__MMColParam = Request.Form("pro_id")
End If
%>
<%
Dim pro
Dim pro_cmd
Dim pro_numRows
Set pro_cmd = Server.CreateObject ("ADODB.Command")
pro_cmd.ActiveConnection = MM_web_ljdata_STRING
pro_cmd.CommandText = "SELECT * FROM shop WHERE pro_id = ?"
pro_cmd.Prepared = true
pro_cmd.Parameters.Append pro_cmd.CreateParameter("param1", 5, 1, -1, pro__MMColParam) ' adDouble
Set pro = pro_cmd.Execute
pro_numRows = 0
%>
<%
Dim user__MMColParam
user__MMColParam = "1"
If (Session("mm_username") <> "") Then
user__MMColParam = Session("mm_username")
End If
%>
<%
Dim user
Dim user_cmd
Dim user_numRows
Set user_cmd = Server.CreateObject ("ADODB.Command")
user_cmd.ActiveConnection = MM_web_ljdata_STRING
user_cmd.CommandText = "SELECT * FROM user WHERE username = ?"
user_cmd.Prepared = true
user_cmd.Parameters.Append user_cmd.CreateParameter("param1", 200, 1, 20, user__MMColParam) ' adVarChar
Set user = user_cmd.Execute
user_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>无标题文档</title>
</head>
<body>
<p>确认订单</p> 53行
<p>您选的商品:<%=(pro.Fields.Item("pro_name").Value)%>,购买的数量为<%= Request.Form("num") %>件,单价为:<%=formatcurrency((pro.Fields.Item("pro_price").Value))%>(元/件)</p>
<p>支付的总金额:<%=formatcurrency((pro.Fields.Item("pro_price").Value)*Request.Form("num"))%>元</p>
<p> </p>
<p>您的收货信息:<%=(user.Fields.Item("name").Value)%>,<%=(user.Fields.Item("tel").Value)%>,<%=(user.Fields.Item("add").Value)%></p>
<form id="form1" name="form1" method="post" action="">
<input type="submit" name="button" id="button" value="确认订单" />
<input name="name" type="hidden" id="name" value="<%=(user.Fields.Item("name").Value)%>" />
<input name="add" type="hidden" id="add" value="<%=(user.Fields.Item("add").Value)%>" />
<input name="tel" type="hidden" id="tel" value="<%=(user.Fields.Item("tel").Value)%>" />
<input name="about" type="hidden" id="about" value="<%=(pro.Fields.Item("pro_name").Value)%><%=formatcurrency((pro.Fields.Item("pro_price").Value))%>(元/件)*<%= Request.Form("num") %>" />
<input name="price" type="hidden" id="price" value="<%=formatcurrency((pro.Fields.Item("pro_price").Value)*Request.Form("num"))%>" />
<input type="hidden" name="username" id="username" />
</form>
<p> </p>
</body>
</html>
<%
pro.Close()
Set pro = Nothing
%>
<%
user.Close()
Set user = Nothing
%>