Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: paging issue

  1. #1
    Senior Coder
    Join Date
    May 2004
    Posts
    1,466
    Thanks
    15
    Thanked 0 Times in 0 Posts

    paging issue

    I have the following code

    Code:
    Set RScatf = Server.CreateObject("ADODB.Recordset")
    RScatf.CursorLocation = 3 ' adUseClient
    RScatf.Open SQL, objconn
        nitemsperpage=12
        ' Set the page size of the recordset
    RScatf.PageSize = nItemsPerPage
        
    ' Get the number of pages
    nPageCount = RScatf.PageCount
     '   response.write "pagecount:" & npagecount
    This works great but if I have exactly 12 items on a page it makes the page count 2 and puts 11 on the first page and 1 on the second

    does anyone know why this would be

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    27,596
    Thanks
    80
    Thanked 4,631 Times in 4,594 Posts
    What "makes the page count 2"???
    This code, or the code you are using to actually show the pages/paging?

    I'm guessing it has nothing to do with this code and everything to do with an error in your display code.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •