This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes I/O and Streams and the fly likes Writing Database output to a file Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Java » I/O and Streams
Bookmark "Writing Database output to a file" Watch "Writing Database output to a file" New topic

Writing Database output to a file

Frank Black

Joined: Mar 31, 2004
Posts: 10

I have a a few database tables and I need a method that writes all of the data to a text file(preferably in the appropriate columns and rows)Can someone suggest where to start or where I could get some sample code?

Any help much appreciated.
Joe Ess

Joined: Oct 29, 2001
Posts: 9048

the place to start with databases is the Java Tutorial on JDBC. The other half of your puzzle is writing out the data, which is covered in the Reading and Writing part of the Java Tutorial.

[How To Ask Questions On JavaRanch]
wood burning stoves
subject: Writing Database output to a file