@Override
public int executeUpdate(Connection conn, String sql, List<Date> param) throws CMSException {
// TODO Auto-generated method stub
// PreparedStatement prep = null;
CallableStatement cs = null;
try {
// prep = conn.prepareStatement(sql);
cs = conn.prepareCall("{call proc_clear_log(?)}");
cs.setString(1, sql);
cs.execute();
return 0;
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
throw new CMSException(CMSException.SERVER_DB_DIS_CONNECT, "数据库连接异常!");
} finally {
if(cs != null) {
try {
cs.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
if(conn != null) {
try {
conn.close();
} catch (SQLException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
}