This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes Controling the size of resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Controling the size of resultset" Watch "Controling the size of resultset" New topic

Controling the size of resultset

Yogender Butola

Joined: Jul 19, 2004
Posts: 12
I want to control the size of result set. For example my query fetches 1500 hundred records. and I want first 300 records in the resultset. After processing the firs 300 records, I want the next 300 records and so on. How can I do this. Please help.
Please help with some code snippets.


Courage is not having the strenth to go on
It's the going on without having the strength.
Adeel Ansari
Ranch Hand

Joined: Aug 15, 2004
Posts: 2874
i think you should do it by putting some logic in your code.

its sounds like paging. so, i suggest you to go for paging some mechanism. you can find many threads here discussing paging stuff. you will find those threads in jsp forum most probably.
wood burning stoves
subject: Controling the size of resultset
Similar Threads
How to find the size of my resultSet
java heap size out of memory error
Resultset Paging
Aggregate functions problem in jsp