diff --git a/src/com/platform/oracle/OracleConnector.java b/src/com/platform/oracle/OracleConnector.java index 7a3c0b9b..d5d9d5aa 100644 --- a/src/com/platform/oracle/OracleConnector.java +++ b/src/com/platform/oracle/OracleConnector.java @@ -69,17 +69,17 @@ public class OracleConnector { } Statement statement = null; try { + FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n"); statement = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); resultSet = statement.executeQuery(sql); /* * if(resultSet.next()){ System.out.println(resultSet.getInt(1)); } */ - FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n" - + "OK \r\n"); + FileOperateHelper.fileWrite(filePath + ".log", "OK \r\n"); } catch (SQLException e) { FileOperateHelper.fileWrite(filePath + ".log", - sql + "\r\n" + e.getMessage() + "\r\n"); + e.getMessage() + "\r\n"); log.error(Custom4exception.OracleSQL_Except, e); } finally { if (null != statement) { @@ -121,15 +121,16 @@ public class OracleConnector { boolean flag = false; Statement statement = null; try { + FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n"); statement = conn.createStatement(); int res = statement.executeUpdate(sql); flag = true; - FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n执行结果:" + res + FileOperateHelper.fileWrite(filePath + ".log", "执行结果:" + res + " \r\n"); } catch (SQLException e) { flag = false; FileOperateHelper.fileWrite(filePath + ".log", - sql + "\r\n" + e.getMessage() + "\r\n"); + e.getMessage() + "\r\n"); log.error(Custom4exception.OracleSQL_Except, e); } @@ -151,16 +152,17 @@ public class OracleConnector { boolean flag = false; Statement statement = null; try { + FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n"); statement = conn.createStatement(); int res = statement.executeUpdate(sql); flag = true; - FileOperateHelper.fileWrite(filePath + ".log", sql + "\r\n 执行结果:"+ res + FileOperateHelper.fileWrite(filePath + ".log", "执行结果:"+ res + " \r\n"); } catch (SQLException e) { flag = false; FileOperateHelper.fileWrite(filePath + ".log", - sql + "\r\n" + e.getMessage() + "\r\n"); + e.getMessage() + "\r\n"); log.error(Custom4exception.OracleSQL_Except, e); } return flag;