public int update(String query) throws SQLException {
  if (!isConnected()) {
    throw new IllegalStateException("Not connected, please connect first!");
  }
  Statement statement;
  if (!isCursorScrollable()) {
    statement=m_Connection.createStatement(ResultSet.TYPE_FORWARD_ONLY,ResultSet.CONCUR_READ_ONLY);
  }
 else {
    statement=m_Connection.createStatement(getSupportedCursorScrollType(),ResultSet.CONCUR_READ_ONLY);
  }
  int result=statement.executeUpdate(query);
  statement.close();
  return result;
}

public int update ( String query ) throws SQLException { if ( ! isConnected ( ) ) { throw new IllegalStateException ( "Not connected, please connect first!" ) ; } Statement statement ; if ( ! isCursorScrollable ( ) ) { statement = m_Connection . createStatement ( ResultSet . TYPE_FORWARD_ONLY , ResultSet . CONCUR_READ_ONLY ) ; } else { statement = m_Connection . createStatement ( getSupportedCursorScrollType ( ) , ResultSet . CONCUR_READ_ONLY ) ; } int result = statement . executeUpdate ( query ) ; statement . close ( ) ; return result ; }
executes a sql ddl query or an insert , delete or update .
