![]() |
![]() |
![]() |
![]() |
调用到该页面都出现如下错误:
错误类型:
ADODB.Field (0x80020009)
BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。
我该怎么修改?就这一个错误了,我看了好长时间都看不出来错在什么地方?又要麻烦你了!
<!--#include file="adminconn.inc" -->
<%
if request("dingdan")<>"" then
sql="select * from orders where inBillNo='"&request("dingdan")&"'"
else
sql="select * from orders where id="&request("search")
end if
set rs=server.createobject("ADODB.Recordset")
rs.open sql,conn,1,1
username=rs("username")
sql1="select * from usertable where username='"&username&"'"
set rs1=server.createobject("ADODB.Recordset")
rs1.open sql1,conn,1,1
%>
<html>
<head>
<title>订单详细说明ade flowershop online</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
.xiao { font-size: 12px}
-->
</style>
</head>
<body bgcolor="#FF99CC" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#000000" vspace="0" hspace="0">
<tr>
<td bgcolor="#FFCCFF" height="27"><font color="#111111">.:: 您可以在这里查看帐号的订单的详细信息</font></td>
</tr>
</table>
<%
set rs2=server.createobject("adodb.recordset")
sqltext2="select * from ShopList where inBillNo='"&request("inBillNo")&"'"
rs2.open sqltext2,conn,1,1
%>
<table width="60%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#999999" bgcolor="#000000" class="xiao">
<tr bgcolor="#000000">
<td height="14" colspan="2"><font color="#FFFFFF"><b><%=rs("inBillNo")%> <font color="#FFFFFF">号订单</font>
</b>订货人信息</font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="31%" height="15" bgcolor="#FFCCFF" class="xiao"><font color="#111111">用户帐号:</font></td>
<td width="69%" height="15" bgcolor="#FFCCFF" class="xiao"><font color="#111111"><b><%=rs1("username")%></b></font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="31%" height="30" bgcolor="#FFCCFF" class="xiao"><font color="#111111">来
自:</font></td>
<td width="69%" height="30" bgcolor="#FFCCFF" class="xiao"><font color="#111111"><b>
<%=rs1("userfrom")%> </b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="30" class="xiao"><font color="#111111">姓名:</font></td>
<td width="69%" height="30" class="xiao"><font color="#111111"><b> <%=rs1("oicq")%>
</b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="30" class="xiao"><font color="#111111">电话:</font></td>
<td width="69%" height="30" class="xiao"><font color="#111111"><b> <%=rs1("telphone")%>
</b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="14" class="xiao"><font color="#111111">联系邮箱:</font></td>
<td width="69%" height="14" class="xiao"><font color="#111111"><b> <%=rs1("email")%>
</b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="-2" class="xiao">性别:</td>
<td width="69%" height="7" class="xiao"> <font color="#111111"><b><%=rs1("max")%></b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="-2" class="xiao"><font color="#000000">商品编号:</font></td>
<td width="69%" height="7" class="xiao"><font color="#111111"><b><%=rs2("subs")%></b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="-2" class="xiao"><font color="#000000">商品名称:</font></td>
<td width="69%" height="7" class="xiao"><font color="#111111"><b><a href=editsubs.asp?searchsubs=<%=rs2("subs")%>><%=rs2("subsname")%></a></b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="-2" class="xiao"><font color="#000000">商品数量:</font></td>
<td width="69%" height="7" class="xiao"><font color="#111111"><b><%=rs2("Quatity")%></b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="-2" class="xiao"><font color="#111111">订购总价格:</font></td>
<td width="69%" height="7" class="xiao"><font color="#111111"><b><%=rs("summoney")%>
RMB 或美元 <%=rs("summoney") \8.5%> 元</b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="-2" class="xiao"><font color="#111111">支付方式:</font></td>
<td width="69%" height="7" class="xiao"><font color="#111111"><b><%=rs("paymenttype")%>
</b></font></td>
</tr>
<tr bgcolor="#FFCCFF">
<td width="31%" height="-2" class="xiao"><font color="#111111">此订单是否交易</font>:</td>
<td width="69%" height="7" class="xiao"><font color="#111111"><b>
<%
if rs("comp")=true then
response.write "已经交易"
else
response.write "尚未交易"
end if
%>
</b></font></td>
</tr>
</table>
——————————————————————————————————————————————————————————————— <br>
<table width="60%" border="1" align="center" cellpadding="3" cellspacing="0" bordercolor="#999999" bgcolor="#000000">
<form name="form1" method="post" action="edituser.asp">
<tr>
<td bgcolor="#000000" height="6" colspan="4" class="xiao"> <font color=#FFFFFF><b><%=rs("inBillNo")%>
<font color="#FFFFFF">号订单</font> </b></font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="7" bgcolor="#FFCCFF" class="xiao">未注册用户订货人姓名:</td>
<td height="7" colspan="3" bgcolor="#FFCCFF" class="xiao"><font color="#000000"><b><%=rs("d1")%></b></font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="14" bgcolor="#FFCCFF" class="xiao">未注册用户订货人电话:</td>
<td height="14" colspan="3" bgcolor="#FFCCFF" class="xiao"><font color=#000000"><b><%=rs("d2")%></b></font></td>
</tr>
<tr bgcolor="#FFFFFF">
<td height="14" bgcolor="#FFCCFF" class="xiao">未注册用户订货人地址:</td>
<td height="14" colspan="3" bgcolor="#FFCCFF" class="xiao"><font color=#000000"><b><%=rs("d3")%></b></font></td>
</tr>
<tr>
<td height="0" width="171" bgcolor="#FFCCFF" class="xiao">
<div align="center"><b><font color="#000000">姓 名:</font></b></div>
</td>
<td height="0" width="146" bgcolor="#FFCCFF" class="xiao">
<p align="center"><font color=#000000"><b><%=rs("sname")%></b></font></p>
</td>
<td height="0" width="160" bgcolor="#FFCCFF" class="xiao">
<div align="center"> <font color="#111111"><b>送达时间:</b></font> </div>
</td>
<td height="0" width="188" bgcolor="#FFCCFF" class="xiao"><font color=#000000"><b><%=rs("semail")%></b></font></td>
</tr>
<tr>
<td width="171" bgcolor="#FFCCFF" class="xiao">
<div align="center"><font ><b><font color="#000000">电 话:</font></b></font></div>
</td>
<td colspan="3" bgcolor="#FFCCFF" class="xiao"><font color=#000000"><b><%=rs("tel")%></b></font></td>
</tr>
<tr>
<td width="171" bgcolor="#FFCCFF" class="xiao">
<div align="center"><font ><b><font color="#000000">地 址:</font></b></font></div>
</td>
<td colspan="3" bgcolor="#FFCCFF" class="xiao"><font color=#000000"><b><%=rs("saddress")%>
</b></font></td>
</tr>
<tr>
<td width="171" bgcolor="#FFCCFF" class="xiao">
<div align="center"><font ><b><font color="#000000">商品名称:</font></b></font></div>
</td>
<td colspan="3" bgcolor="#FFCCFF" class="xiao">
<div align="left"><font color="#000000"><b><%=rs2("subsname")%></b></font></div>
</td>
</tr>
<tr>
<td width="171" bgcolor="#FFCCFF" class="xiao">
<div align="center"><font ><b><font color="#000000">满意程度:</font></b></font></div>
</td>
<td width="146" bgcolor="#FFCCFF" class="xiao">
<div align="center"><b><font color="#000000">满意</font></b></div>
</td>
<td width="160" bgcolor="#FFCCFF" class="xiao">
<div align="center"><b><font color="#000000">一般</font></b></div>
</td>
<td width="188" bgcolor="#FFCCFF" class="xiao">
<div align="center"><b><font color="#000000">不满意</font></b></div>
</td>
</tr>
<tr>
<td width="171" bgcolor="#FFCCFF" class="xiao">
<div align="center"><font ><font color="#000000"><b>顾客意见:</b></font></font></div>
</td>
<td colspan="3" bgcolor="#FFCCFF" class="xiao"> </td>
</tr>
<tr>
<td width="171" bgcolor="#FFCCFF" class="xiao">
<div align="center"><font color="#000000" class="xiao"><b>顾客签名:</b></font></div>
</td>
<td colspan="3" bgcolor="#FFCCFF" class="xiao"> </td>
</tr>
<tr bgcolor="#FFCCFF">
<td height="273" colspan="4" class="xiao">
<p><font>公司名称:吉林鲜花礼品中心<br>
<br>
电话:0432-4886454、0432-4886452<br>
<br>
WWW.jlonlineflower.COM <br>
<br>
网址:www.jlonlineflower.com<br>
<br>
Email:yunkun2001_li@yahoo.com.cn<br>
<br>
服务项目:鲜花、绿植、蛋糕、巧克力、礼品等<br>
<br>
服务范围:可送达中国境内300多个城市,包括港澳台地区。</font></p> </td>
</tr>
</form>
</table>
<table border="1" cellpadding="0" cellspacing="0" width="60%" bordercolorlight="#2E60A4" bordercolordark="#ffcc00" height="68" align="center">
<tr bgcolor="#333333">
<td width="16%" height="18" align="center"><font color="#FFFFFF">商品编号</font></td>
<td width="33%" height="18" align="center"><font color="#FFFFFF">商品名称</font></td>
<td width="21%" height="18" align="center"><font color="#FFFFFF">商品价格</font></td>
<td width="12%" height="18" align="center"><font color="#FFFFFF">商品数量</font></td>
<td width="18%" height="18" align="center"><font color="#FFFFFF">金额小计</font></td>
</tr>
<% While Not rs2.EOF%>
<tr bgcolor="#FFFFFF">
<td width="22%" height="22" align="center" bgcolor="#FFCCFF"><%=rs2("subs")%></td>
<td width="33%" height="22" align="center" bgcolor="#FFCCFF"><a href=editsubs.asp?searchsubs=<%=rs2("subs")%>><%=rs2("subsname")%></a></td>
<td width="21%" height="22" align="center" bgcolor="#FFCCFF"><%=rs2("price")%>元</td>
<td width="12%" height="22" align="center" bgcolor="#FFCCFF"><%=rs2("Quatity")%></td>
<td width="18%" height="22" align="center" bgcolor="#FFCCFF"><%=rs2("price")*rs2("Quatity")%>元</td>
</tr>
<%
rs2.MoveNext
Wend
%>
<tr bgcolor="#FFCCFF">
<td width="100%" height="22" colspan="5">
<p align="right"> </p>
</td>
</tr>
</table>
——————————————————————————————————————————————————————————————— <br>
<table width="60%" border="1" cellspacing="0" cellpadding="0" align="center" bgcolor="#FFFFFF" bordercolor="#000000" height="20%">
<tr>
<td nowrap bgcolor="#FFCCFF">
<blockquote>
<pre><b> <br><%=rs("semail2")%></b></pre>
</blockquote>
</td>
</tr>
</table>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</body>
</html>
两处
之后都要判断一下是不是记录集是不是空的,如果是空的话,你再取数据就会出现这种错误。判断方法就是:if not rs.eof and not rs.bof then
QUOTE:
rs.open sql,conn,1,1
……'如果不空的话,就执行这里面的内容:)
end if
谢谢了,我看看去了!
我怎么加不对位置?还是请版主帮忙了!
修改用户名和密码 |
修改用户名和密码 |
我也出现这样的错误
帮忙看看谢谢
这是代码
<!--#include file = admin_chk.asp -->
<head>
<!--#include file = language.asp -->
<style>
<!--
a:link { font-size: 9pt; font-family: 宋体; color: #000000;text-decoration: none; }
a:visited { color: #000000; font-family: 宋体; font-size: 9pt;text-decoration: none; }
a:hover { font-size: 9pt; font-family: 宋体; color: #000000;TEXT-DECORATION: underline; }
body { font-family: 宋体; color: #000000; font-size: 9pt }
p { color: #000000; font-family: 宋体; font-size: 9pt }
td { font-size: 9pt; font-family: 宋体; color: #000000 }
input { font-size: 9pt; font-family: 宋体; color: #000000 }
-->
</style>
</head>
<!--#include file = ../include/conn.asp -->
<%
sql = "select * from [admin] where [user]='"&session("admin__user")&"'"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
%>
<div align="center">
<p> </p>
<table border="1" width="500" id="table1" cellpadding="3" style="border-collapse: collapse" bordercolor="#C0C0C0" cellspacing="0">
<tr>
<td width="473" background="images/topBar_bg.gif">
<font face="Wingdings"> </font><b>修改用户名和密码</b></td>
</tr>
<tr>
<td><br>
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.username.value == "")
{
alert("请在 用户名 域中输入值。");
theForm.username.focus();
return (false);
}
if (theForm.username.value.length < 2)
{
alert("在 用户名 域中,请至少输入 2 个字符。");
theForm.username.focus();
return (false);
}
if (theForm.username.value.length > 20)
{
alert("在 用户名 域中,请最多输入 20 个字符。");
theForm.username.focus();
return (false);
}
if (theForm.password.value == "")
{
alert("请在 密码 域中输入值。");
theForm.password.focus();
return (false);
}
if (theForm.password.value.length < 4)
{
alert("在 密码 域中,请至少输入 4 个字符。");
theForm.password.focus();
return (false);
}
if (theForm.password.value.length > 20)
{
alert("在 密码 域中,请最多输入 20 个字符。");
theForm.password.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="admin_admin2.asp?id=<%=rs("id")%>" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
<table border="0" width="100%" id="table2" cellspacing="0" cellpadding="5">
<tr>
<td width="152" align="center">用户</td>
<td>
<!--webbot bot="Validation" s-display-name="用户名" b-value-required="TRUE" i-minimum-length="2" i-maximum-length="20" --><input type="text" name="username" size="38" maxlength="20" value="<%=rs("user")%>" <%if Request.Cookies("admindj")<>1 then response.write "readonly"%>></td>
</tr>
<tr>
<td width="152" align="center">密码</td>
<td>
<!--webbot bot="Validation" s-display-name="密码" b-value-required="TRUE" i-minimum-length="4" i-maximum-length="20" --><input type="password" name="password" size="38" maxlength="20"></td>
</tr>
</table>
<p align="center"><input type="submit" value="提交" name="B1"> <input type="reset" value="重置" name="B2"></p>
</form>
</td>
</tr>
</table>
</div>
<% if Request.Cookies("admindj")=1 then %>
<p align="center"> </p>
<div align="center">
<table border="1" width="600" id="table3" style="border-collapse: collapse" bordercolor="#C0C0C0" cellspacing="0" cellpadding="3">
<tr>
<td colspan="3" background="images/topBar_bg.gif"><font face="Wingdings">1</font><b>所有管理员
</b>(<a href="admin_admin_add.asp">增加录入人员</a>) (<a href="admin_admin_sh_add.asp">增加审核员</a>) (<a href="admin_stat_user.asp">查看用户文章排名</a>)</td>
</tr>
<%
sql = "select * from admin where dj<>'1'"
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open sql,conn,1,1
while not rs.eof
%>
<tr>
<td width="199"><%=rs("user")%>
<%
Set rs4 = Server.CreateObject("ADODB.RecordSet")
rs4.Open "select * from [news] where adduser='"&rs("user")&"' order by id desc",conn,1,1
Response.Write "("&rs4.recordcount&"篇)"
if rs("dj")="3" then Response.Write "<font color=red>[录入员]</font>"
if rs("dj")="2" then Response.Write "<font color=blue>[审核员]</font>"
%>
</td>
<td width="264" align=center>
<%
lmid=rs("lmid")
nr=split(lmid,",")
'Response.Write ubound(nr)
For i=0 to ubound(nr)
aaa=nr(i)
if aaa="" then aaa=0
sql3 = "select * from lm where id="&aaa
Set rs3 = Server.CreateObject("ADODB.RecordSet")
rs3.Open sql3,conn,1,1
if rs3.recordcount<>0 then
Response.Write rs3("lm")&rs3("lm2")&rs3("lm3")&","
end if
rs3.close
set rs3=nothing
next
%>
</td>
<%
conn.close
set conn=nothing
%>
请参照前面的分析尝试解决
操作选项: 评分 加精 解精 奖惩 设专题 设公告 解公告 固顶 总固顶 解固顶 结帖 解结帖 锁帖 解锁 移帖 删帖 |
|