赣榆区中医院招聘:asp分页程序中遇到的一个小错误

来源:百度文库 编辑:中科新闻网 时间:2024/05/10 12:04:42
rs.AbsolutePage=cint(currentpage)
以上代码运行出错:
ADODB.Recordset (0x800A0CB3)
当前记录集不支持书签。这可能是提供程序或选定的游标类型的限制。

换了其他游标类型还是不行。
可能的原因是什么
dim currentpage, rowcount, i
currentpage=trim(request("currentpage"))
if currentpage=""then
currentpage=1
end if

set rs=server.CreateObject("adodb.recordset")
rs.cursorType=adOpenStatic
rs.Pagesize=3
'set rs=conn.execute("select * from table2 " )
rs.open "select * from table2",conn

rs.AbsolutePage=cint(currentpage)
rowcount=0

while not rs.eof and rowcount<rs.pagesize
.......
哪里有错吗

rs.cursorType=adOpenStatic 删除


rs.open "select * from table2",conn

改成
rs.open "select * from table2",conn,1,1

你把这行
rs.cursorType=adOpenStatic
注释掉试试

代码,游标和标签用的时候注意,数据库下标问题,你这个是读的时候,应该超出下标了吧。