|
|
|
@ -72,6 +72,12 @@ public class OracleConnector {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 不要使用这个方法 (statement没法关闭)
|
|
|
|
|
* @param conn
|
|
|
|
|
* @param sql
|
|
|
|
|
* @param filePath
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public synchronized static ResultSet getSQLExecResultSet(Connection conn,
|
|
|
|
|
String sql, String filePath) {
|
|
|
|
|
ResultSet resultSet = null;
|
|
|
|
@ -105,6 +111,14 @@ public class OracleConnector {
|
|
|
|
|
return resultSet;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/** 不要使用这个方法 (statement没法关闭)
|
|
|
|
|
* @param url
|
|
|
|
|
* @param user
|
|
|
|
|
* @param password
|
|
|
|
|
* @param sql
|
|
|
|
|
* @param filePath
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
public synchronized static ResultSet getSQLExecResultSet(String url,
|
|
|
|
|
String user, String password, String sql, String filePath) {
|
|
|
|
|
ResultSet result = null;
|
|
|
|
@ -138,6 +152,7 @@ public class OracleConnector {
|
|
|
|
|
flag = true;
|
|
|
|
|
FileOperateHelper.fileWrite(filePath + ".log", "执行结果:" + res
|
|
|
|
|
+ " \r\n");
|
|
|
|
|
statement.close();
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
flag = false;
|
|
|
|
|
FileOperateHelper.fileWrite(filePath + ".log",
|
|
|
|
@ -169,6 +184,7 @@ public class OracleConnector {
|
|
|
|
|
flag = true;
|
|
|
|
|
FileOperateHelper.fileWrite(filePath + ".log", "执行结果:"+ res
|
|
|
|
|
+ " \r\n");
|
|
|
|
|
statement.close();
|
|
|
|
|
|
|
|
|
|
} catch (SQLException e) {
|
|
|
|
|
flag = false;
|
|
|
|
|