public static int executeUpdate(Connection connection,String rawSqlQuery,Object... parameters) throws SQLException {
  PreparedStatement stmt=null;
  try {
    stmt=connection.prepareStatement(rawSqlQuery);
    for (int index=0; index < parameters.length; index++) {
      JdbcUtils.bindParameter(stmt,index + 1,parameters[index]);
    }
    return stmt.executeUpdate();
  }
  finally {
    JdbcUtils.closeStatement(stmt);
  }
}

public static int executeUpdate ( Connection connection , String rawSqlQuery , Object ... parameters ) throws SQLException { PreparedStatement stmt = null ; try { stmt = connection . prepareStatement ( rawSqlQuery ) ; for ( int index = 0 ; index < parameters . length ; index ++ ) { JdbcUtils . bindParameter ( stmt , index + 1 , parameters [ index ] ) ; } return stmt . executeUpdate ( ) ; } finally { JdbcUtils . closeStatement ( stmt ) ; } }
execute an insert / update / delete statement with number of affected rows returned .
