Pull Data from DB in chunks
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Brandon_Fouts
Posted On:   Wednesday, March 6, 2002 02:11 PM

I am new to JSP and I am wanting to find out how to pull data from my DB in chunks. If I have 5000 records I only want to pull x number at a time and display that x number on the page. The user can click next and it will display the next 500 records. The general setup is I have a user submit a request from an html page, this sends data to a jsp which sends the request to a bean and the JSP uses getter methods to retrieve the data and display it in a table, and it doesn't display until the table is completely populated. What is the most practical solution for pulling data in chunks and if you have any examples that would be excellent.

Re: Pull Data from DB in chunks

Posted By:   Robert_Brunner  
Posted On:   Wednesday, March 6, 2002 03:10 PM

Try setFetchSize(), a method in the Statement interface. Note that it is only a hint to the Driver. If you want something more powerful, you could always write a stored procedure.
About | Sitemap | Contact