private boolean OPDelete(String strTableName, String strID,
int OPDeleteFlag, String strErrorInfo, UserCommon userCommon)
throws Exception {
if (!StringUtil.isValidateString(strTableName)
|| !StringUtil.isValidateString(strID)) {
return false;
}
Connection conn = null;
PreparedStatement ps = null;
String sql = "";
boolean b = false;
try {
sql = "UPDATE "
+ StringUtil.validateString(strTableName)
+ " SET deleteflag=?, lastupdatetime=?, updaterole_id=?,updaterole_name=? WHERE id=? ";
LOG.info(sql);
conn = JDBC.getConnection();
ps = JDBC.scrollReadOnlyResultSet(sql, conn);
int p = 1;
ps.setInt(p++, OPDeleteFlag);
ps.setTimestamp(p++, DateUtil.getCurLongDateTimestamp());
ps.setString(p++, StringUtil.checkString(userCommon
.getStrUserRoleID()));
ps.setString(p++, StringUtil.checkString(userCommon
.getStrUserName()));
ps.setString(p++, StringUtil.checkString(strID));
if (ps.executeUpdate() == 0) {
throw new Exception(strErrorInfo);
}
b = true;
} finally {
GcUtil.setNull(sql);
JDBC.release(null, ps, conn);
}
return b;
}
------解决思路----------------------
哪有删除的语句
------解决思路----------------------
自己吧log.info打印出来的sql,给粘贴到对应的pl/sql或者sql/puls中,执行下。。