Logo Search packages:      
Sourcecode: mysql-connector-java version File versions

boolean com::mysql::jdbc::ResultSet::next (  )  throws SQLException [inline]

A ResultSet is initially positioned before its first row, the first call to next makes the first row the current row; the second call makes the second row the current row, etc.

If an input stream from the previous row is open, it is implicitly closed. The ResultSet's warning chain is cleared when a new row is read

Returns:
true if the new current is valid; false if there are no more rows
Exceptions:
SQLException if a database access error occurs

Reimplemented in com::mysql::jdbc::UpdatableResultSet.

Definition at line 2867 of file ResultSet.java.

Referenced by com::mysql::jdbc::DatabaseMetaData::getBestRowIdentifier(), com::mysql::jdbc::DatabaseMetaData::getColumnPrivileges(), com::mysql::jdbc::DatabaseMetaData::getColumns(), com::mysql::jdbc::DatabaseMetaData::getCrossReference(), com::mysql::jdbc::DatabaseMetaData::getExportedKeys(), com::mysql::jdbc::DatabaseMetaData::getImportedKeys(), com::mysql::jdbc::DatabaseMetaData::getIndexInfo(), com::mysql::jdbc::DatabaseMetaData::getPrimaryKeys(), com::mysql::jdbc::DatabaseMetaData::getProcedureColumns(), com::mysql::jdbc::DatabaseMetaData::getProcedures(), com::mysql::jdbc::DatabaseMetaData::getTablePrivileges(), com::mysql::jdbc::DatabaseMetaData::getTables(), com::mysql::jdbc::DatabaseMetaData::getUserName(), and com::mysql::jdbc::CallableStatement::retrieveOutParams().

                                              {
        checkClosed();

        if (this.onInsertRow) {
            this.onInsertRow = false;
        }

        if (this.doingUpdates) {
            this.doingUpdates = false;
        }

        boolean b;

        if (!reallyResult()) {
            throw new SQLException(Messages.getString(
                    "ResultSet.ResultSet_is_from_UPDATE._No_Data_115"),
                SQLError.SQL_STATE_GENERAL_ERROR); //$NON-NLS-1$
        }

        if (this.rowData.size() == 0) {
            b = false;
        } else {
            if (!this.rowData.hasNext()) {
                // force scroll past end
                this.rowData.next();
                b = false;
            } else {
                clearWarnings();
                this.thisRow = this.rowData.next();
                b = true;
            }
        }

        return b;
    }


Generated by  Doxygen 1.6.0   Back to index