网页设计分页问题

来源:百度知道 编辑:UC知道 时间:2024/06/14 03:12:18
错误提示
ADODB.Recordset 错误 '800a0bcd'

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

/asp_news/Include/syscode.asp,行430

打开syscode.asp查代码

if rsArticle.bof and rsArticle.eof then
response.Write("<br><li>" & msg021 & "</li>")
else
if currentPage=1 then
call ArticleContent(TitleLen)
else
if (currentPage-1)*MaxPerPage<totalPut then
rsArticle.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rsArticle.bookmark
call ArticleContent(TitleLen)
else
currentPage=1
call ArticleContent(TitleLen)
end if
end if
end if
数据库文件是存在的,代码是别人写的,我看起有点费力.我想应该是代码的问题

一、把判断语句改为:
If Not rs.eof Then
''如果存在这条记录,执行更新操作
......
Else
''如果不存在
......
End If

也有可能是你的数据库中确实没有这条记录,建议你再检查一下。

二、

<%set com=server.createobject("adodb.connection")
com.open "DBQ="& Server.MapPath("data.asp") &";Driver={Microsoft Access Driver (*.mdb)}"
if request("ok")="ok" then response.write "hello"
set rs=com.execute("select*from msg where edt>=#"&date&"# ORDER BY id DESC")
if rs.recordcount>0 then
rs.pagesize=10
else
response.write("暂无数据!")
response.end
end if
page=request("page")
newpage=0
if trim(page)="" then
page=1
elseif page>=rs.pagecount then
page=rs.pagecouht
end if
rs.absolutepage=page

i=i+1%>

三、
sSql="Select ID,s