回 帖 发 新 帖 刷新版面

主题:关于ADODB.Field 错误,

ADODB.Field 错误 '800a0bcd' BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。 /ReadArticlemb.asp,行 31 



ReadArticlemb.asp如下

<!--#include file="Config.asp" -->
<!--#include file="Cn.asp" -->
<%
Dim id
id=request.querystring("id")
Set rs = Server.Createobject("ADODB.recordset")
asql="select  *   from   Article  where id="&id&"   order by id desc"
rs.open asql,Cn

if  rs.eof and  rs.bof then
response.write"该内容不存在!"
response.end
else
datetime=rs("date")
title_5=rs("title")
IDD_5=rs("id")
LeftTitle_5=left(title_5,12)
BigClass_5=rs("BigClass")
Pathfilename=rs("Pathfilename")
Article=rs("Article")
KeyWords=rs("KeyWords")
Description=rs("Description")
NoClass=rs("NoClass")
Set rs1 = Server.Createobject("ADODB.recordset")
asql1="select  *   from   BigClass  where ClassCode='"&BigClass_5&"'   order by id desc"
rs1.open asql1,Cn
BigClass08=rs1("BigClass")
ClassCode08=rs1("ClassCode")
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=gb2312" />
<META http-equiv=X-UA-Compatible content=IE=EmulateIE7>
<title><%=Title_5%></title>
<meta name="keywords" content="<%=KeyWords%>" />
<meta name="description" content="<%=Description%>" />
<link href="images/moban.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>

<!--#include file="top.asp" -->
<div id=BodyContent01>
<!--#include file="left.asp" -->

<div id=RCNN01>

<div id=RCNNtitle02>
<a  href=<%=Web_WebUrl%>index.html title='网站首页'  >网站首页</a>  >> &nbsp;<a  href=<%=Web_WebUrl%><%=ClassCode08%>.html title='<%=BigClass08%>'><%=BigClass08%></a></span> 
<font color=#717171>>></font>  <span><a  href=<%=Web_WebUrl%><%=IDD_5%>.html><%=left(title_5,30)%></a>
</div>

<div id=RCSN>
<span style="line-height:28px;font-size:12px;">

<%=Article%>

</span>
</div>
<div id=RightCEnd01> </div>
</div>

</div>

<!--#include file="foot.asp" -->

<%end if%>
</body>
</html>



请各位大侠帮帮忙啊.....

回复列表 (共1个回复)

沙发

Set rs1 = Server.Createobject("ADODB.recordset")
asql1="select  *   from   BigClass  where ClassCode='"&BigClass_5&"'   order by id desc"
rs1.open asql1,Cn
'这里加个判断试试看呢?
if not rs1.eof then
   BigClass08=rs1("BigClass")
   ClassCode08=rs1("ClassCode")
end if

我来回复

您尚未登录,请登录后再回复。点此登录或注册