This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes Reading ResultSet data Batch Wise Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Reading ResultSet data Batch Wise" Watch "Reading ResultSet data Batch Wise" New topic

Reading ResultSet data Batch Wise

girraj meena

Joined: Jun 22, 2009
Posts: 3
Hi All

I have to read REsultSet in a batch.Since My resultSet size quite Huge .
How i can read suppose batch size =100 ..100 records at time ...then apply business rule
then move to next batch ??
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33134

You could use the technique "paging" uses where you query for 100 rows at a time.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

This article details some possible approaches including an example of a query that fetches only X rows at a time.

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
I agree. Here's the link:
subject: Reading ResultSet data Batch Wise
It's not a secret anymore!