Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

BufferedWriter error

 
Amar Naik
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the output of SQL query is around 19254 rows. But my below code writes only 18700 lines to o/p file. Sometimes the o/p file as 18900 rows. No idea why the file write is having error. It does not even throw any exception
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anytime you write output to a file through a stream, make sure you close the stream when you are finished writing.
 
Amar Naik
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks. It solved the problem
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic