wood burning stoves
The moose likes JDBC and Relational Databases and the fly likes JDBC & Flat files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC & Flat files" Watch "JDBC & Flat files" New topic

JDBC & Flat files

bob connolly
Ranch Hand

Joined: Mar 10, 2004
Posts: 204

I see the following reference that JDBC can be used to access "flat files", but have yet to find any examples thereof!

I've already spent several hours searching to no avial, can anyone tell me if i'm interpreting the following product statement correctly to mean that i can use the JDBC to read a comma delimited file?

My ultimate objective is to read the file and then use the XML Resultset capability!

Thanks for any insights!

"The JDBCTM API provides universal data access from the JavaTM programming language. Using the JDBC 3.0 API, you can access virtually any data source, from relational databases to spreadsheets and flat files. JDBC technology also provides a common base on which tools and alternate interfaces can be built."
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

JDBC could access any data for which there has been a Driver implemented. I've never tried this, but here is a driver for CSV files.

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
bob connolly
Ranch Hand

Joined: Mar 10, 2004
Posts: 204
Thanks Paul, looks very interesting!, going to try it today and let you know how it goes!

Have a good one!
Bill Johnston
Ranch Hand

Joined: Nov 17, 2005
Posts: 201
Unless this is a quest for knowledge and experience or a job requirement that one thing - but otherwise, why would you want to do this? Since cvs files are by definition delimited, I would think that it would be faster and easier to use java.io for this.


I agree. Here's the link: http://aspose.com/file-tools
subject: JDBC & Flat files
It's not a secret anymore!