Home > front end >  How to MYSQL stored in the pictures (Java)
How to MYSQL stored in the pictures (Java)

Time:10-09

How to use the Java code in the MySQL database access pictures...

CodePudding user response:

Common practice is only stored image path, rather than the picture itself, if the image itself, the reference code

String 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
  • Related