If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to load content of CSV file fo MySQL into database file using java

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 03-05-06, 10:07
kapil.dhakad kapil.dhakad is offline
Registered User
 
Join Date: Jul 2005
Posts: 11
How to load content of CSV file fo MySQL into database file using java

Hi,

We are developing a web application, in this application we want to give facility to 'some' users to upload "csv" file on server. (Or it may be pipe separated or tab separated).

After uploading this file will goes into deployment environment directory of web application (At server side).

Information in this file is related with "entity" and it having same format and constraints required for that entity. A table exist in MySQL database for this entity.

Our problem is, after uploading this files from client machine to server, how to parse contents of this file and load this content into database.

Just want to clear one thing...
LOAD INTO.. for MySQL will not be useful in this case because if we run this command then csv file should present in "data" directory of MySQL.

Can any one suggest us efficient way of doing it, using JAVA ?

Thanks in advance
- Kapil Dhakad
Reply With Quote
  #2 (permalink)  
Old 03-05-06, 12:48
jfulton jfulton is offline
Registered User
 
Join Date: Apr 2005
Location: Baltimore, MD
Posts: 297
I don't think I fully understand your question...why won't LOAD DATA INFILE work?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On