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

void com::mysql::jdbc::ResultSet::checkRowPos (  )  throws SQLException [inline, protected]

Ensures that the cursor is positioned on a valid row and that the result set is not closed

Exceptions:
SQLException if the result set is not in a valid state for traversal

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

Definition at line 4337 of file ResultSet.java.

Referenced by getAsciiStream(), getBinaryStream(), and getBlob().

                                                     {
        checkClosed();

        if (!this.rowData.isDynamic() && (this.rowData.size() == 0)) {
            throw new SQLException(Messages.getString(
                    "ResultSet.Illegal_operation_on_empty_result_set"),
                SQLError.SQL_STATE_GENERAL_ERROR);
        }

        if (this.rowData.isBeforeFirst()) {
            throw new SQLException(Messages.getString(
                    "ResultSet.Before_start_of_result_set_146"),
                SQLError.SQL_STATE_GENERAL_ERROR); //$NON-NLS-1$
        }

        if (this.rowData.isAfterLast()) {
            throw new SQLException(Messages.getString(
                    "ResultSet.After_end_of_result_set_148"),
                SQLError.SQL_STATE_GENERAL_ERROR); //$NON-NLS-1$
        }
    }


Generated by  Doxygen 1.6.0   Back to index