Asp文件预览时出错??急!大侠帮忙

来源:百度知道 编辑:UC知道 时间:2024/05/29 14:03:02
我在做BBS时的文件mainnote.asp是显示所有留言用的。有段代码是:
<%
dim ipagesize '每页显示记录数
ipagesize=15
page=request.querystring("page")
if page=" " then
page=1
end if '如果是第一次浏览该页,则说明page是空,那么就将它的值设为1
'连接数据库
set conn=server.createobject("adodb.connection")
conn.open "Driver={Microsoft Access Driver (*.mdb)};DBQ="& server.mappath("/BBS/notebook.mdb")

set objnoters=server.createobject("adodb.recordset")
ssql="select * from notebook order by notetime desc" '将最新的留言显示再最前面
objnoters.open ssql,conn,1,3
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
'到此完成数据库打开操作
if objnoters.eof then
response.write "目前还没有任何文章信息!"
response.end
end if
'制作显示留言的表头
response.write"<tr bgcolor=#baccff class=class1 align=center><td width=50&

1.检查是否调用资料库连接页面了.
<!--#include file="资料库连接页面.asp"-->

2.你要显示资料库的表中,是否有满足条件的资料

objnoters.absolutepage=cint(page)
试试