File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
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: 9188

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]
I agree. Here's the link:
subject: Writing Database output to a file
It's not a secret anymore!