Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

inserting an image in to the data base

 
yugandhar channagiri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can you help me in finding out solution for inserting an image in to the database ?? and also give me sample code for this problem........
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yugandhar channagiri:
can you help me in finding out solution for inserting an image in to the database ?? and also give me sample code for this problem........


Did you care to give it a try yourself. Just a deep breath .....Google or some random ideas.

Asking for the code doesn't really make sense, if you don't care to give the problem a try by yourself.

Anyway, few hints are you can store image as a BLOB, or simply opening a binaryinputstream.

Another way is, if you are sure that the file will remain on server then, you can just store the URI of file and retrieve the file with the help of URI.
 
yugandhar channagiri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thank you for your immediate response,the problem here is it is inserting in to the database but it became a over head for me in the case of retriving.i,e the is not showing
 
Anubhav Anand
Ranch Hand
Posts: 341
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yugandhar channagiri:
thank you for your immediate response,the problem here is it is inserting in to the database but it became a over head for me in the case of retriving.i,e the is not showing


does that mean that you are able to save successfully but facing problems while retrieving i.e while displaying back??

well then after you get the resultset try something like,




Hope that helps.
 
yugandhar channagiri
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes problem with the retriving
ya good the code is working.........................
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic