aspose file tools*
The moose likes JDBC 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 Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "how to insert image into mySql database" Watch "how to insert image into mySql database" New topic
Author

how to insert image into mySql database

Bee Ho
Greenhorn

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.


...watch me...as 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...
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: how to insert image into mySql database