List of utility methods to do SQL Update
void | execUpdateQuery(Connection C, String query) exec Update Query Statement S; try { S = C.createStatement(); S.executeUpdate(query); S.close(); catch (SQLException E) { System.out.println("SQLException: " + E.getMessage()); ... |
void | ExecUpdateSql(Connection conn, String strSql) Exec Update Sql java.sql.Statement stmt = conn.createStatement(); logger.info(strSql); int i = stmt.executeUpdate(strSql); logger.info("rows count={}", i); if (conn.getAutoCommit() == false) { conn.commit(); |
int | executeUpdate(Connection conn, String sql) execute Update int num = 0; try { Statement stmt = conn.createStatement(); num = stmt.executeUpdate(sql); } catch (Exception e) { e.printStackTrace(); return num; ... |
boolean | executeUpdate(Connection conn, String sql) execute Update Statement stmt = null; try { stmt = conn.createStatement(); stmt.executeUpdate(sql); } catch (Exception e) { throw e; } finally { close(stmt); ... |
boolean | executeUpdate(Connection conn, String sql) execute Update Statement stmt = null; try { stmt = conn.createStatement(); stmt.executeUpdate(sql); } finally { close(stmt); return true; ... |
boolean | executeUpdate(Connection conn, String sql) execute Update System.out.println("Update SQL: " + sql); Statement stmt = null; try { stmt = conn.createStatement(); stmt.executeUpdate(sql); } catch (Exception e) { throw e; } finally { ... |
int | executeUpdate(Connection conn, String sql, Object... parameters) execute Update PreparedStatement stmt = null; int result = -1; try { stmt = conn.prepareStatement(sql); bindParams(stmt, parameters); result = stmt.executeUpdate(); } finally { if (stmt != null) { ... |
int | executeUpdate(Connection connection, String query) execute Update Statement stmt = null; try { stmt = connection.createStatement(); return stmt.executeUpdate(query); } finally { if (stmt != null) try { stmt.close(); ... |
void | executeUpdate(Connection connection, String statement) execute Update Statement stmt = null; try { stmt = connection.createStatement(); stmt.executeUpdate(statement); } finally { close(stmt); |
int | executeUpdate(Connection dbConnection, String query) Executes an update query. Statement statement = dbConnection.createStatement(); int updated = statement.executeUpdate(query); statement.close(); return updated; |