hi all,
In my application the scenario is ..
1: Parsing of Xls file which retrieves the values from Xls and set them to the Bean.
2: After parsing , each record is sent to validation with the records present in another table if the data is validated it is inserted to the new table .
3: So each time i insert the record , connection is opened and closed..the process take time ...due to that it says time out on web ..
4: File is having 4000 records..so need a optimum solution
Can anybody tell me the possible solution so that i can handle this..
Thanks in advance..
Regards
raza!
Good luck!!
A small leak can sink a Gigantic ship.>
Use 1 connection for validating and inserting instead of 4000?
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
If you're using a PreparedStatement, use a single Connection and insert the records in batches (see the API for PreparedStatement addBatch method)
4000 isn't a huge number of inserts.