| Author |
Inserting image to MySQL Database
|
Aravind Prasad
Ranch Hand
Joined: Dec 28, 2005
Posts: 258
|
|
Dear Ranchers, I have a mysql database table called hrms_photo. The table details are shows below I have the following program for uploading the image to MySQL database. When I run the program, I cannot insert the image which is larger than 50KB. In the log file, I'm getting the error like this Please help me to sort this issue Ranchers.. Thanks/Regards
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
YOu probably want to swap to a larger BLOB data type if you are hitting the limit. MySQL also has mediumblob and largeblob.
|
JavaRanch FAQ HowToAskQuestionsOnJavaRanch
|
 |
Aravind Prasad
Ranch Hand
Joined: Dec 28, 2005
Posts: 258
|
|
Thankyou Mr.Paul Sturrock , I have put mediumblob and it worked fine. But I couldn't find LargeBlob.. Please advise. Thanks/Regards
|
 |
Paul Sturrock
Bartender
Joined: Apr 14, 2004
Posts: 10336
|
|
|
Sorry, my mistake. Its called longblob.
|
 |
Aravind Prasad
Ranch Hand
Joined: Dec 28, 2005
Posts: 258
|
|
Thankyou very much!! Regards
|
 |
Rob Spoor
Sheriff
Joined: Oct 27, 2005
Posts: 19216
|
|
|
This is also a MySQL setting. I tried your code, but a) it's limit is 64KB on my machine, and b) it just truncated without aborting.
|
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions How To Answer Questions
|
 |
 |
|
|
subject: Inserting image to MySQL Database
|
|
|