This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes how to insert image into mySql database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "how to insert image into mySql database" Watch "how to insert image into mySql database" New topic

how to insert image into mySql database

Bee Ho

Joined: Feb 04, 2004
Posts: 1
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

Joined: Dec 16, 2003
Posts: 121
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. I'm walking the path...
Chris Mathews
Ranch Hand

Joined: Jul 18, 2001
Posts: 2712
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...
Have you checked out Aspose?
subject: how to insert image into mySql database
jQuery in Action, 3rd edition