| Author |
Insert Quert return value
|
Ramkumar Subburaj
Ranch Hand
Joined: Sep 07, 2007
Posts: 83
|
|
Hello, I am trying upload file from a JSPfile using MiltipartUpload API. When the user selects the file and clicks the upload button, the request goes to a servlet where i am inserting the image file name into the db and writing the file to the disk. I am using MySQL 5.0.24 It is taking atleast 2 minutes for the servlet to complete the process. Thougth the image name is inserted into the db successfully, the insert query is returning 0. can anyone pleasehelp?
|
SCJP 1.5, SCWCD 1.4.
Hanging between Web Services and EJB
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
Thougth the image name is inserted into the db successfully, the insert query is returning 0.
Is this an issue? Why do you need the return value?
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Ramkumar Subburaj
Ranch Hand
Joined: Sep 07, 2007
Posts: 83
|
|
|
i got the solution for this. one of the fields in my table had a size of 10 characters and i was sending more than 10 characters through my query.
|
 |
Scott Selikoff
Saloon Keeper
Joined: Oct 23, 2005
Posts: 3652
|
|
|
Shouldn't there have been a SQL exception then alerting you to the problem?
|
My Blog: Down Home Country Coding with Scott Selikoff
|
 |
Brij Garg
Ranch Hand
Joined: Apr 29, 2008
Posts: 234
|
|
I hope while inserting you must be using executeQuery method. This method returns ResultSet. So how return value can be 0. Please correct me if I am wrong.
|
 |
 |
|
|
subject: Insert Quert return value
|
|
|