User: hr      
Date: 05/09/23 05:02:57

Modified:
 /dba/dbaccess/source/core/api/
  RowSet.cxx

Log:
 INTEGRATION: CWS dba201b (1.133.44); FILE MERGED
 2005/09/21 06:45:08 oj 1.133.44.3: RESYNC: (1.133-1.135); FILE MERGED
 2005/07/26 10:50:32 oj 1.133.44.2: #i52440# throw exception when only select 
is allowed and an update or insert is executing
 2005/07/26 10:48:19 oj 1.133.44.1: #i52440# throw exception when only select 
is allowed and an update or insert is executing

File Changes:

Directory: /dba/dbaccess/source/core/api/
=========================================

File [changed]: RowSet.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/api/RowSet.cxx?r1=1.135&r2=1.136
Delta lines:  +5 -2
-------------------
--- RowSet.cxx  8 Sep 2005 10:00:22 -0000       1.135
+++ RowSet.cxx  23 Sep 2005 12:02:55 -0000      1.136
@@ -1073,7 +1073,7 @@
        ::connectivity::checkDisposed(ORowSet_BASE1::rBHelper.bDisposed);
        // not allowed when standing on insert row
        ::osl::ResettableMutexGuard aGuard( *m_pMutex );
-       if(!m_pCache || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY || m_bNew)
+       if ( !m_pCache || m_nResultSetConcurrency == 
ResultSetConcurrency::READ_ONLY || m_bNew || ((m_pCache->m_nPrivileges & 
Privilege::UPDATE ) != Privilege::UPDATE) )
                throwFunctionSequenceException(*this);
 
        if(m_bModified)
@@ -1117,7 +1117,7 @@
        // after the last row
        // stands on the insert row
        // the concurrency is read only
-       if(!m_pCache || m_bBeforeFirst || m_bAfterLast || m_bNew || 
m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY)
+       if(!m_pCache || m_bBeforeFirst || m_bAfterLast || m_bNew || 
m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY || 
((m_pCache->m_nPrivileges & Privilege::DELETE ) != Privilege::DELETE))
                throwFunctionSequenceException(*this);
 
        // this call position the cache indirect
@@ -1275,6 +1275,9 @@
 
        ::osl::ResettableMutexGuard aGuard( *m_pMutex );
        checkPositioningAllowed();
+       if ((m_pCache->m_nPrivileges & Privilege::INSERT ) != Privilege::INSERT)
+               throwFunctionSequenceException(*this);
+
 
        if(notifyAllListenersCursorBeforeMove(aGuard))
        {




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to