• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Insert Quert return value

 
Ramkumar Subburaj
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Paul Sturrock
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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?
 
Ramkumar Subburaj
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
author
Saloon Keeper
Posts: 4028
18
Eclipse IDE Flex Google Web Toolkit
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Shouldn't there have been a SQL exception then alerting you to the problem?
 
Brij Garg
Ranch Hand
Posts: 234
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic