Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JDBC & Flat files

 
bob connolly
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello!

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
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
bob connolly
Ranch Hand
Posts: 204
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Paul, looks very interesting!, going to try it today and let you know how it goes!

Have a good one!
bc
 
Bill Johnston
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.

~Bill
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic