Click here to Skip to main content
15,892,005 members

Comments by leejoyprakash (Top 4 by date)

leejoyprakash 26-Sep-12 8:38am View    
Thank you Mehdi Gholam for your answer. This is really a useful piece of information.

Sorry that I forget to explain about my CSV file structure, in my case, the contents of one CSV file doesn't belongs to one table.
The CSV file is as follows:

COL 1,CAT 1,CAT 2,CAT 3,CAT 4,ITEM,DESCRIPTION
Val 1,Val 2,Val 3,Val 4,Val 5,Val 6,Val 7

The requirements are as follows:

1. COL 1 belongs to table1. First I need to check whether it exists, if not skip the record by tracking this in Error.csv
2. CAT 1 to CAT 4 belongs to table2. Check whether each of this exists, if not import into table2.
3. Item & Description belongs to table3. Check if exists, if not import into table3.

So I assume that, it not possible to do a bulk import for a CSV with values belonging to more than one table. Please correct me if I am wrong.

Thanks once again for your answer which really was a new idea for me.

Thanks
leejoyprakash 21-Sep-12 10:35am View    
Did you configure and test your ODBC DataSource ? Can you print and check whether any exception is raised in both servlet and JSP ?
catch(Exception e){ e.printStackTrace();} .
leejoyprakash 21-Sep-12 9:36am View    
I think you are missing the statement stmt = con.createStatement(); add this before stmt.executeUpdate(query);
leejoyprakash 21-Sep-12 9:29am View    
See if there are some errors in your javascript code with the help of firebug.