Meaningless Drivel is fun!*
The moose likes JDBC 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 OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Reading ResultSet data Batch Wise" Watch "Reading ResultSet data Batch Wise" New topic
Author

Reading ResultSet data Batch Wise

girraj meena
Greenhorn

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 ??
Regards
Girraj
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

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


[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
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

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

http://www.javaranch.com/journal/2008/08/Journal200808.jsp#a4


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Reading ResultSet data Batch Wise