aspose 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
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: 41525
    
  53
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 ]

Ping & DNS - my free Android networking tools app
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3704
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: CSV file to database