@WebService() public class UrmapsDatabaseManage {
private static Connection getConnection() thr开发者_如何学运维ows Exception { Class.forName("com.mysql.jdbc.Driver"); String url = "jdbc:mysql://localhost:3306/dburmap";
return DriverManager.getConnection(url,
"root", "123"); }
above is my connection with mysql db..Could someone help me to do a code to insert image into my db? Please help me :(
Instead of saving whole image in database you should consider uploading the image somewhere relative your webapp path and only save that path in database.
精彩评论