This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to create flate from Resultset?

 
Jothi kannan
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Team,
I have resultset of size of 50000 records, I need to wite to flat file, I am using I/O objects like follows:
outPW_FlatFile = new PrintWriter(bufferedOutputStream(out_FlatFile), true);

I am getting outof mememry exception. what is the optimal ways to create the flat file?
 
Joe Ess
Bartender
Posts: 9319
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the JavaRanch.
Rather than read in all 50000 records then writing them to a file, try reading a subset of the result set, 1 or 1000, and write that block to the file.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic