Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

put image into database

 
senthil raja
Greenhorn
Posts: 17
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi.
how can i input image into MySQL and also retrieve it through jsp ?
i need to store one full image of type ".gif" or ."jpg"
and not url of the image..........
please can anyone help me.
Regards
Senthil
 
Sajee Joseph
Ranch Hand
Posts: 200
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
To store an image into the SQl database u can do the following
1) Convert the image into byte[] (byte array)
2)Store the byte[] into the sql database. The field type is 'binary'
..Regards
..saj
 
Sandeep Jain
Ranch Hand
Posts: 124
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello ,
Well , I dont have much experience but out of the projects that I have done ,we dont store the image itself rather than we store the pasth of the image .
------------------
Try and Try Till u succeed
Sandeep Jain
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic