diff options
Diffstat (limited to 'dbaccess/source/core/api/RowSet.cxx')
-rw-r--r-- | dbaccess/source/core/api/RowSet.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 5f421f89724d..2d7bda3f29b4 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1575,7 +1575,11 @@ void ORowSet::setStatementResultSetType( const Reference< XPropertySet >& _rxSta { ResultSetType::SCROLL_INSENSITIVE, ResultSetConcurrency::READ_ONLY }, { ResultSetType::FORWARD_ONLY, ResultSetConcurrency::READ_ONLY } }; - for ( sal_Int32 i=0; i<5; ++i ) + sal_Int32 i=0; + if ( m_xActiveConnection->getMetaData()->isReadOnly() ) + i = 2; // if the database is read-only we only should use read-only concurrency + + for ( ; i<5; ++i ) { nResultSetType = nCharacteristics[i][0]; nResultSetConcurrency = nCharacteristics[i][1]; @@ -1897,6 +1901,8 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi if(!xColumn.is()) { // no column found so we could look at the position i + //bReFetchName = sal_True; + //sColumnLabel = ::rtl::OUString(); Reference<XIndexAccess> xIndexAccess(m_xColumns,UNO_QUERY); if(xIndexAccess.is() && i <= xIndexAccess->getCount()) { @@ -1906,7 +1912,9 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi { Sequence< ::rtl::OUString> aSeq = m_xColumns->getElementNames(); if( i <= aSeq.getLength()) + { m_xColumns->getByName(aSeq.getConstArray()[i-1]) >>= xColumn; + } } } if(bReFetchName && xColumn.is()) @@ -2314,6 +2322,12 @@ sal_Bool ORowSet::impl_buildActiveCommand_throw() { xQuery->getPropertyValue(PROPERTY_COMMAND) >>= sCommand; xQuery->getPropertyValue(PROPERTY_ESCAPE_PROCESSING) >>= bDoEscapeProcessing; + if ( bDoEscapeProcessing != m_bUseEscapeProcessing ) + { + sal_Bool bOldValue = m_bUseEscapeProcessing; + m_bUseEscapeProcessing = bDoEscapeProcessing; + fireProperty(PROPERTY_ID_ESCAPE_PROCESSING,bOldValue,bDoEscapeProcessing); + } ::rtl::OUString aCatalog,aSchema,aTable; xQuery->getPropertyValue(PROPERTY_UPDATE_CATALOGNAME) >>= aCatalog; |