Results 1 to 2 of 2

Thread: paging records

  1. #1
    Join Date
    Mar 2006

    Unanswered: paging records

    i have an application that searches records from a database, sometimes the recors are too many and i want to brake them into individual pages showing a max of 10 records per page. i tried using paging recordset feature from dreamweaver but it does not work well, it repeats records.
    Please help me with any code that i can impletemt, here is the connection and query:

    Dim Recordset1
    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Dim MM_objConn_STRING
    set MM_objConn_STRING=server.CreateObject("ADODB.conne ction") = "Provider=SQLOLEDB.1;DataSource=datatest\INST1;Dat abase=datatest;uid=user_namewd=password;Network Library=DBMSSOCN;"
    Recordset1.ActiveConnection = MM_objConn_STRING

    Recordset1.Source = "SELECT idmum,namefirst,namelast,namemiddle FROM tbl_test where namelast like 'smith' "

    I am displaying results in a table.

    Thank you.

  2. #2
    Join Date
    May 2006
    New York
    what's your DBMS (e.g. SQL Server, MySQL, etc.),

    If you use MySQL, at the end of your SELECT statement you can put in LIMIT x, y
    where x is the starting point and y is the number of records you want. SO what you can do is keep track of where the user is i.e. viewing 11 - 20, x = 11, if they click next, x = 21. (I assume y will always be 10).
    Last edited by blmgyossi; 09-26-06 at 18:42.

Posting Permissions

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