67,515
社区成员
发帖
与我相关
我的任务
分享
Connection con = db.getConn();
String erpsql = "insert into table_name values(?,?,?,?)";
PreparedStatement stmt = con.prepareStatement(erpsql);
stmt.setString(1,id);
stmt.setString(2,type_id);
stmt.setString(3,date);
stmt.setBinaryStream(4,fin,(int)file.getFileSize());
stmt.executeUpdate();
Connection con = db.getConn();
String erpsql = "insert into table_name values(?,?,?,?)";
PreparedStatement stmt = con.prepareStatement(erpsql);
stmt.setString(1,id);
stmt.setString(2,type_id);
stmt.setString(3,date);
System.out.println("fsdfassss===="+file.getFileSize());
try {
stmt.setBytes(4, file.getFileData());
} catch (FileNotFoundException e1) {
e1.printStackTrace();
} catch (IOException e1) {
e1.printStackTrace();
}
stmt.executeUpdate();