This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How do I save a picture in database??

 
Nadia Marques
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Helo!! I have a picture in the JPanel and I need to save it in a database. How can I do this?
Nadia
 
Ken Blair
Ranch Hand
Posts: 1078
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This probably belongs in JDBC forums.

You should be able to open a Connection and open a binary stream you can write to using a PreparedStatement. In our database we store images as blobs and upload them with this methodology. Unfortunately the source isn't something I can post here, but that should give you an idea of where to look.
 
Casper Maxwell
Ranch Hand
Posts: 88
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may check this tip:

How to store/retrieve image to/from SQLServer
http://www.java-tips.org/content/view/203/29/
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic