File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to insert image into mySql database

 
Bee Ho
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi everybody,
i would like to ask how to insert image into mysql database. I try to think a method for solving the problems. the method is that creating a ejb bean with image setter and getter. the setter and getter are with Ojbect type for parameter and return.
in fact, setting the setter and getter with parameter type and return type as string type that is right or not.
besides, i would like to ask how to get a image from local directory by using front end function based on Strut technology.
Best regard,
Bee Ho
 
Sergiu Truta
Ranch Hand
Posts: 121
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First of all you should make sure that MySQL (and the version you are using) can store images.
Second, you should use a wrapper for images (there might be some). Don't use Object.
 
Chris Mathews
Ranch Hand
Posts: 2712
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think that this question is probably more about JDBC than it is about EJB (though I guess CMP could serve you purposes).
I am moving this thread to the JDBC forum for further discussion...
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic