• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

inserting an image in to the data base

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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........
 
Ranch Hand
Posts: 341
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes problem with the retriving
ya good the code is working.........................
 
What a stench! Central nervous system shutting down. Save yourself tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic