File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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 Head First Android this week in the Android 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: 32312

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]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, 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!