BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。怎么处理

早知今日 早知今日 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
ADODB.Field 错误 '80020009'

BOF 或 EOF 中有一个是“真”,或者当前的记录已被删除,所需的操作要求一个当前的记录。

/search.asp,行 0




<!--#include file="inc/config.asp"-->
<!--#include file="inc/conn.asp"-->
<%
page=request("page")
up_down=request.QueryString("up_down")
keyword=Server.HTMLEncode(request("keywords"))
Set rs=Server.CreateObject("Adodb.Recordset")
rs.open "select * from Article where title like '%"&keyword&"%' order by addtime desc",Conn,1,2
pgsz=15
if rs.recordcount=0 then
cur_page=1
total=1
session("count")=0
else
if isempty(session("cur_page")) or isNull(session("cur_page")) then
session("cur_page")=0
end if
cur_page=session("cur_page")
rs.pagesize=cint(pgsz)
if (rs.recordcount/pgsz)=INT(rs.recordcount/pgsz) then
total=INT(rs.recordcount/pgsz)
else
total=INT(rs.recordcount/pgsz)+1
end if
if page="" then
if len(up_down)=0 then
cur_page=1
end if
if up_down="up" then
cur_page=cur_page-1
end if
if up_down="down" then
cur_page=cur_page+1
end if
if cur_page>total then
cur_page=total
end if
if cur_page=0 then
cur_page=1
end if
else
cur_page=page
end if
session("count")=rs.recordcount
rs.absolutepage=cur_page
rowcount=rs.pagesize
end if
session("cur_page")=cur_page
session("total")=total
%>
<!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=gb2312" />
<title>信息检索_<%=SiteName%></title>
<meta name="keywords" content="<%=rs("keywords")%>"/>
<meta name="description" content="<%=rs("description")%>"/>
<link rel="stylesheet" type="text/css" href="images/css/xiao5u.css" />
<script type="text/javascript" src="images/js/jquery-1.8.3.min.js"></script>
<script type="text/javascript" src="images/js/menu.js"></script>
</head>
<body>
<!--#include file="inc/head.asp"-->
<div class="mainbox">
<div class="mainnr bot1">
<div class="grayline ">
<div class="positionbg">
<div class="position bot10">当前位置:首页 >> 浏览信息</div>
</div>
<div class="sealist" style="font-size:14px;">
<ul>
<%
if rs.eof then
response.Write("<li>报歉!未找到符合条件的内容!</li>")
else
i=1
do while not rs.eof and i<=pgsz%> <li style="line-height:30px;"><a href="Article.asp?id=<%=rs("id")%>" target="_blank" title="<%=rs("title")%>"><%=rs("title")%></a> <%=rs("addtime")%> <p style="color:#008000"> Article.asp?id=<%=rs("id")%></p> </li>
<%
i=i+1
rs.movenext
loop
end if
%>
</ul>
</div>
</div>
<div class="clear-1"></div>
</div>
</div>
<%
rs.close
set rs=nothing
%>
<!--#include file="inc/bottom.asp"-->
</body>
</html>


麻烦大神
...全文

相关推荐

评论 3
收藏 已收藏
分享
返回顶部
早知今日
ASP 28,401 成员 356,940 内容