diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-21 08:32:46 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-21 08:32:46 +0100 |
commit | 6b654608285809ed2f754987f94728c3870d25e3 (patch) | |
tree | a2f9fd0a15dcdc99a7fcfddc1acaa71191023958 /dbaccess | |
parent | a4bcd82d3aebaa856b11ba92571e79ea6aab5775 (diff) |
dba33d: #i108517# order of checks changed
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 8d15ba24604e..5a3514d65f23 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -2652,8 +2652,8 @@ void ORowSet::checkUpdateIterator() void ORowSet::checkUpdateConditions(sal_Int32 columnIndex) { checkCache(); - if ( columnIndex <= 0 || sal_Int32((*m_aCurrentRow)->get().size()) <= columnIndex ) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_INDEX ), SQL_INVALID_DESCRIPTOR_INDEX, *this ); + if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY) + ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_RESULT_IS_READONLY ), SQL_GENERAL_ERROR, *this ); if ( rowDeleted() ) ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_ROW_ALREADY_DELETED ), SQL_INVALID_CURSOR_POSITION, *this ); @@ -2661,8 +2661,8 @@ void ORowSet::checkUpdateConditions(sal_Int32 columnIndex) if ( m_aCurrentRow.isNull() ) ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_CURSOR_STATE ), SQL_INVALID_CURSOR_STATE, *this ); - if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY) - ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_RESULT_IS_READONLY ), SQL_GENERAL_ERROR, *this ); + if ( columnIndex <= 0 || sal_Int32((*m_aCurrentRow)->get().size()) <= columnIndex ) + ::dbtools::throwSQLException( DBACORE_RESSTRING( RID_STR_INVALID_INDEX ), SQL_INVALID_DESCRIPTOR_INDEX, *this ); } // ----------------------------------------------------------------------------- void SAL_CALL ORowSet::refreshRow( ) throw(SQLException, RuntimeException) |