jQuery in Action, 3rd edition
The moose likes JDBC and Relational Databases and the fly likes XML, flat files to database 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 "XML, flat files to database" Watch "XML, flat files to database" New topic

XML, flat files to database

Dushy Inguva
Ranch Hand

Joined: Jun 24, 2003
Posts: 264
Hi all,
I am trying to insert from a CSV file, a tabbed file and if possible an xml file into the database.
The solution has to be java only and independent of the database (we are porting from sqlserver to db2). So, are there any free java based utilities which insert the given flat file's data into the database?
I searched and was surprised to find therez no obvious free ones. This is quite common requirement right?

jimmy coyne

Joined: Feb 01, 2002
Posts: 8
Could you insert it as a clob ?
Joe Ess

Joined: Oct 29, 2001
Posts: 9189

If you happen to be using MS SQL Server, it has a utility called Data Transformation Services. Great tool for doing what you describe.

[How To Ask Questions On JavaRanch]
Joe Nguyen
Ranch Hand

Joined: Apr 20, 2001
Posts: 161
Convert the file to either blob or clob and store it to the table
I agree. Here's the link: http://aspose.com/file-tools
subject: XML, flat files to database
It's not a secret anymore!