关注
PreparedStatement preparedStatement = 
      connection.prepareStatement("INSERT INTO BOOKCOVERS VALUES(?,?)");
File imageFile = new File("c:\\\\redbookcover.jpg");
InputStream inputStream = new FileInputStream(imageFile);
preparedStatement.setString(1," 0738425826");
preparedStatement.setBinaryStream(2,inputStream,(int)(imageFile.length()));
preparedStatement.executeUpdate();
具体:http://www-900.ibm.com/developerWorks/cn/dmdd/library/techarticles/0310bhogal/0310bhogal.shtml#0