Commit 9758ee99 by jinfeng.wang

fix

parent 8070a36c
......@@ -65,10 +65,11 @@ public class StorageTag {
}
insert(map);
insertAdmin(resultSetAdmin);
resultSet.close();
resultSetAdmin.close();
preparedStatement.close();
insertAdmin(resultSetAdmin);
resultSetAdmin.close();
preparedStatement_admin.close();
connection.close();
} catch (Exception e) {
e.printStackTrace();
......@@ -98,9 +99,9 @@ public class StorageTag {
Class.forName("com.mysql.jdbc.Driver");
Connection con = DriverManager.getConnection(CONNECTION_URL, USER, PASSWORD);
Statement stmt1 = con.createStatement();
Statement stmt2 = con.createStatement();
// Statement stmt2 = con.createStatement();
String deleteSql1 = "DELETE FROM storage_result WHERE package_name IN ";
String deleteSql2 = "DELETE FROM storage WHERE package_name IN ";
// String deleteSql2 = "DELETE FROM storage WHERE package_name IN ";
Iterator<String> iterator = set.iterator();
StringBuffer sql = new StringBuffer();
while (iterator.hasNext()) {
......@@ -109,9 +110,9 @@ public class StorageTag {
}
stmt1.execute(deleteSql1 + "(" + sql.substring(0, sql.length() - 1) + ")");
stmt1.close();
stmt2.execute(deleteSql2 + "(" + sql.substring(0, sql.length() - 1) + ")");
// stmt2.execute(deleteSql2 + "(" + sql.substring(0, sql.length() - 1) + ")");
// stmt2.close();
con.close();
stmt2.close();
} catch (Exception e) {
e.printStackTrace();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment