aspose file tools
The moose likes JDBC and Relational Databases and the fly likes CSV file to database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "CSV file to database" Watch "CSV file to database" New topic
Author

CSV file to database

Patrick Mugabe
Ranch Hand

Joined: Jan 08, 2002
Posts: 132
I want to update a csv file to my database. Can you help with ideas. I am not sure how it's done.
[ August 30, 2006: Message edited by: Patrick Mugabe ]
Patrick Mugabe
Ranch Hand

Joined: Jan 08, 2002
Posts: 132
For those who might face the same problem, there's an open source csvJdbc driver that can be used. It reads from the cvs then you can use your ordinary JDBC java code to insert into your database table
Ulf Dittmer
Rancher

Joined: Mar 22, 2005
Posts: 42956
    
  73
Is the problem the reading or writing of CSV files, or the DB access? If the former, have a look at a library that can work with CSV files, like the Ostermiller Utils.
[ August 30, 2006: Message edited by: Ulf Dittmer ]
Scott Selikoff
author
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3740
    
  10

CSV files are pretty easy to read, you might want to consider just writing a simple JDBC based script that performs the update manually.


[OCA 8 Book] [Blog]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: CSV file to database
 
It's not a secret anymore!