Palli
09-23-2008, 07:45 AM
On my website i want to allow users to upload tab delimited files which are then stored as new tables in a MySQL database.
i am currently using java servlets to handle requests made to the database. Could i pass the text file to the servlet and use SQL function "LOAD DATA INFILE...".
Would i have to create the table first, on the fly. so in the servlet it would first obtain the column names and create a table accordingly using, "CREATE TABLE test ...." . and then call "LOAD DATA INFILE...".
Does anyone have any tips on the best way of achieving this, or a link to a tutorial or guide?
Thanks
i am currently using java servlets to handle requests made to the database. Could i pass the text file to the servlet and use SQL function "LOAD DATA INFILE...".
Would i have to create the table first, on the fly. so in the servlet it would first obtain the column names and create a table accordingly using, "CREATE TABLE test ...." . and then call "LOAD DATA INFILE...".
Does anyone have any tips on the best way of achieving this, or a link to a tutorial or guide?
Thanks