DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Can any One help me ? please.

  1. #1
    Join Date
    Oct 2001
    Location
    Doha, Qatar
    Posts
    103

    Post

    In our 'Administration Module' there is a page called 'View all Invoices' to see all the invoices that are generated, from our website. This page displays 50 records intially and on clicking 'Next' button the next 50 records are displayed and this continues till all the records are displayed. In the Same way a 'PREVIOUS' button displays the prevoius 50 records and on further clicking of this button the next set of 50 previous records are displayed and this goes on till the records are finished.
    In the application the java developers have written a code in such a way that, it pulls all the records say 1000, and sorts them using 'Invoice_No' column, in the descending order. So on every click on 'Next' button, the application used to pull out all the 1000 records and sort by 'Invoice_No' everty time and the next 50 records are captured and sent to the user, to display the respective 50 records every time. The mechanism was same was on clicking 'PREVIOUS' button also except that it diplayed 50 previous records.
    So, Is there any way to keep all the 1000 records in the memory, at the first call to the database and supply the user next 50 records on every click on 'NEXT' or previous 50 records on clicking 'PREVIOUS' button's respectively rather than calling the 1000 records every time from database and sorting them and sending the respective 50 records depending on the type of click till the user ends his/her session('NEXT' or 'PREVIOUS') ?

  2. #2
    Join Date
    Sep 2001
    Location
    NJ, USA
    Posts
    1,287
    This way of get rows from database is most easy, when ur developers use JDBC.
    U can only rewrite application code.

    1. create class rec_invs
    2. create vector (or hash or ...) from rec_invs calss objects.
    3. create methods, that can control ur scrollable grid (or list)
    ...


Posting Permissions

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


Click Here to Expand Forum to Full Width