Java Utililty Methods SQL Update

List of utility methods to do SQL Update

Description

The list of methods to do SQL Update are organized into topic(s).

Method

intExecuteUpdateQuery(String query, Connection con)
Execute Update Query
Statement statement = con.createStatement();
return statement.executeUpdate(query);
intexecuteUpdateSP(Connection conn, String spName, Object... sqlParameters)
execute stored procedure
spName = getQueryString(spName, sqlParameters);
int rs = 0;
CallableStatement cs = null;
if (conn != null) {
    cs = conn.prepareCall(spName);
    if (sqlParameters != null) {
        for (int i = 1; i <= sqlParameters.length; i++) {
            cs.setObject(i, sqlParameters[i - 1]);
...
booleanExecuteUpdateStmt(Connection conn, PreparedStatement pstmt, PreparedStatement lockStatement, String tablename)
Execute Update Stmt
String name_array[] = { tablename };
return ExecuteUpdateStmt(conn, pstmt, lockStatement, name_array);