CodePudding user response:
Common practice is only stored image path, rather than the picture itself, if the image itself, the reference codeString SQL="insert into photo (name, photo) values (?,?,?,?,? ,?) ";
ps=conn.prepareStatement(sql);
Ps. SetString (1, "Tom");
Ps. SetBinaryStream (2, in, in, the available ());
ps.executeUpdate();
CodePudding user response:
https://www.cnblogs.com/warrior4236/p/5682830.html