用ado连接数据库的话比较简单!
有几个变量可以用:
pagesize、absolutepage、pagecount

解决方案 »

  1.   

    同意 李寻欢 
    adodb的recordset又你要的分页的所有
      

  2.   

    <%
    strsql = "select * from t"
    objrecord.open strsql,dbconn,adopenstatic,adLockReadOnly '--必须使用静态结果集objrecord.pagesize=8        '--指定每页的记录数
    if request("int_page") <> "" then '--request("int_page")是直接跳转到某一页时传入参数
    session("CurrentPage") = 0 + request("int_page")
    else
    Select Case Request("Direction")
      Case ""
    Session("CurrentPage") = 1
      Case "Next"
    Session("CurrentPage") = Session("CurrentPage") + 1
      Case "Prev"
    if session("currentpage") > 1 then
    Session("CurrentPage") = Session("CurrentPage") - 1
    end if
    End Select
    end if
    if session("currentpage") < 1 then Session("CurrentPage")=1 end if
    if session("currentpage") > objrecord.PageCount then session("currentpage") = objrecord.PageCount end if
    '--用Session("CurrentPage")记录当前的分页页数
    objrecord.AbsolutePage = CLng(Session("CurrentPage")) '--该语句把结果集的游标指针移到指定页数的第一条记录
    %>以上是个简单的应用,在显示的时候也要注意只显示一页的记录。
      

  3.   

    使用ADO进行工作
    以下为记录集对象的属性AbsolutePage  当前记录所在页面
    AbsolutePosition 当前记录在记录集中的位置
    ActiveConection 正在使用的当前链接
    BOF,EOF 文件的开始和结尾
    Book 记录集和中的一个特殊参考标志
    CacheSize 存储在客户机内存中的记录数
    CursorType 打开记录集使用的光标类型
    EditMode 指出当前纪录是否正在被编辑或添加
    Filter 筛选一个记录集
    LockType 强制记录集加锁的类型
    MaxRecords 返回记录集中记录的最大条数
    PageCount 记录集中页面的数量
    PageSize 一张页面中记录的数量
    RecordCount 记录集中记录的数量
    Source 记录集的来源(也就是一个数据表和查询映射表)
    Status 记录的状态还有很多的对象参数,查询资料研究一下吧!