wood burning stoves 2.0*
The moose likes Java in General and the fly likes BufferedWriter error   Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "BufferedWriter error   " Watch "BufferedWriter error   " New topic

BufferedWriter error

Amar Naik
Ranch Hand

Joined: Sep 26, 2003
Posts: 43
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

Joined: Feb 07, 2005
Posts: 2367
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

Joined: Sep 26, 2003
Posts: 43
thanks. It solved the problem
Don't get me started about those stupid light bulbs.
subject: BufferedWriter error
Similar Threads
Determining null resultset
Memory issue with Result set
How to connect to mysql database?
Stored procedures in JDBC?
Need Code Review