File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC 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 Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Databases » JDBC
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
Marshal

Joined: Mar 22, 2005
Posts: 42906
    
  69
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: 3716
    
    5

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


My Blog: Down Home Country Coding with Scott Selikoff
 
 
subject: CSV file to database