CLI0620E IOException, error reading from input stream.
Cause: Error happened when reading data to be put from input stream.
Action: Make sure the file exists, and file length is correctly given.
Cause: Error happened when reading data to be put from input stream.
Action: Make sure the file exists, and file length is correctly given.
FileInputStream fis=new FileInputStream(files);
PreparedStatement ps = conn.prepareStatement(
"INSERT INTO binary_data (name,data)" +
"VALUES (?, ?)"); //预编译SQL语句
ps.setString(1, files.getName());
ps.setBinaryStream(2, fis,(int)files.length());
//上面语句出问题啊!
帮忙看看啊!
ps.executeUpdate();
fis.close();
ps.close();