Recordset paging - RS page returning all pages

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sbryguy
    New Member
    • Apr 2008
    • 12

    Recordset paging - RS page returning all pages

    **** My oversight. ****

    The recordset works great, my WHILE loop was adjusted to show only the first 50 results not all. Sorry for the mistaken post, couldn't figure how to remove it.


    -------------------------------------

    Greetings,

    I have a some issues with trying to page through a recordset. The recorset seems to start on the approiate row but ends up showing ALL of the remaining records.

    I'm very new to cursor location/typs with ADO so bear with me if it's just a cursor issue.

    Code:
    rsCurrentPage = Request.QueryString("page")
    rsPageSize = 3
    Set rs2 = Server.CreateObject("ADODB.Recordset")
    rs2.ActiveConnection = MM_conn_adminPortal_STRING
    rs2.Source = strSql2
    rs2.PageSize = rsPageSize
    rs2.CacheSize = rsPageSize
    rs2.CursorType = 3
    rs2.CursorLocation = 2
    rs2.LockType = 1
    rs2.Open()
    rs2.AbsolutePage = rsCurrentPage
    If Err.number <> 0 then
    	TrapError Err.description
    End If
    rs2_numRows = 0
    Thanks for any help anyone can provide
    Last edited by sbryguy; Dec 2 '08, 09:56 PM. Reason: Easy Miss!!
  • CroCrew
    Recognized Expert Contributor
    • Jan 2008
    • 564

    #2
    Here is an example I did for someone before:



    Hope this help ya,
    CroCrew

    Comment

    Working...