28,391
社区成员
发帖
与我相关
我的任务
分享
Microsoft VBScript 运行时错误 错误 '800a01b6'
对象不支持此属性或方法: 'rs.cursoLocation'
/search.asp,行 9
<!--#include file="inc/config.asp"-->
<!--#include file="inc/conn.asp"-->
<%
page=request("page")
up_down=request.QueryString("up_down")
keyword=Replace(request("keywords"), "'", "''")
Set rs = CreateObject("Adodb.Recordset")
rs.cursoLocation = 3
rs.open "select * from Article where title like '%" & keyword & "%' order by addtime desc", Conn, 1 , 3
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 And rs.BOF 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>
keyword=Replace(request("keywords"), "'", "''")
Set rs = CreateObject("Adodb.Recordset")
rs.cursorLocation = 3
rs.open "select * from Article where title like '%" & keyword & "%' order by addtime desc", Conn, 3 , 1
...
If rs.EOF And rs.BOF Then
response.Write("<li>报歉!未找到符合条件的内容!</li>")
...
keyword=Replace(request("keywords"), "'", "''")
Set rs = CreateObject("Adodb.Recordset")
rs.cursoLocation = 3
rs.open "select * from Article where title like '%" & keyword & "%' order by addtime desc", Conn, 1 , 3
...
If rs.EOF And rs.BOF Then
response.Write("<li>报歉!未找到符合条件的内容!</li>")