diff options
author | Ocke Janssen <oj@openoffice.org> | 2001-09-18 12:14:31 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2001-09-18 12:14:31 +0000 |
commit | 26229a697231db7ca8b9dc7c0232dab7cf555485 (patch) | |
tree | 2dcdb065e8636224708b6fa1fb0d4f5582b68a65 /connectivity/source | |
parent | f1e561c11efa4f35f788a2a9c59eb5ece0b36788 (diff) |
#92103# check if content is readonly
Diffstat (limited to 'connectivity/source')
-rw-r--r-- | connectivity/source/drivers/dbase/DConnection.cxx | 9 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/DDatabaseMetaData.cxx | 14 | ||||
-rw-r--r-- | connectivity/source/drivers/dbase/DTables.cxx | 23 |
3 files changed, 32 insertions, 14 deletions
diff --git a/connectivity/source/drivers/dbase/DConnection.cxx b/connectivity/source/drivers/dbase/DConnection.cxx index 8ad239b1f803..cf40b0292103 100644 --- a/connectivity/source/drivers/dbase/DConnection.cxx +++ b/connectivity/source/drivers/dbase/DConnection.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DConnection.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: oj $ $Date: 2001-08-24 06:05:37 $ + * last change: $Author: oj $ $Date: 2001-09-18 13:14:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -171,8 +171,7 @@ Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareStatement( con // -------------------------------------------------------------------------------- Reference< XPreparedStatement > SAL_CALL ODbaseConnection::prepareCall( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException) { - ::osl::MutexGuard aGuard( m_aMutex ); - checkDisposed(OConnection_BASE::rBHelper.bDisposed); - return NULL; } +// ----------------------------------------------------------------------------- + diff --git a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx index 4872edf9f6c2..53fe6065630c 100644 --- a/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx +++ b/connectivity/source/drivers/dbase/DDatabaseMetaData.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DDatabaseMetaData.cxx,v $ * - * $Revision: 1.25 $ + * $Revision: 1.26 $ * - * last change: $Author: oj $ $Date: 2001-08-29 12:19:31 $ + * last change: $Author: oj $ $Date: 2001-09-18 13:14:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -105,6 +105,9 @@ #ifndef _COMPHELPER_TYPES_HXX_ #include <comphelper/types.hxx> #endif +#ifndef _UCBHELPER_CONTENT_HXX +#include <ucbhelper/content.hxx> +#endif using namespace ::comphelper; using namespace connectivity::dbase; @@ -509,7 +512,12 @@ sal_Bool SAL_CALL ODbaseDatabaseMetaData::isReadOnly( ) throw(SQLException, Run { ::osl::MutexGuard aGuard( m_aMutex ); - return sal_False; + sal_Bool bReadOnly = sal_False; + static ::rtl::OUString sReadOnly = ::rtl::OUString::createFromAscii("IsReadOnly"); + ::ucb::Content aFile(m_pConnection->getContent(),::com::sun::star::uno::Reference< com::sun::star::ucb::XCommandEnvironment >()); + aFile.getPropertyValue(sReadOnly) >>= bReadOnly; + + return bReadOnly; } // ----------------------------------------------------------------------------- diff --git a/connectivity/source/drivers/dbase/DTables.cxx b/connectivity/source/drivers/dbase/DTables.cxx index 6a4a9a8599ea..d892f4e7f565 100644 --- a/connectivity/source/drivers/dbase/DTables.cxx +++ b/connectivity/source/drivers/dbase/DTables.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DTables.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: oj $ $Date: 2001-08-13 13:58:56 $ + * last change: $Author: oj $ $Date: 2001-09-18 13:14:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -148,11 +148,22 @@ void SAL_CALL ODbaseTables::appendByDescriptor( const Reference< XPropertySet >& if(pTable) { pTable->setPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME),descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME))); - if(pTable->CreateImpl()) + try { - pTable->setNew(sal_False); - pTable->construct(); - ODbaseTables_BASE_BASE::appendByDescriptor(Reference< XPropertySet >(*pTable,UNO_QUERY)); + if(pTable->CreateImpl()) + { + pTable->setNew(sal_False); + pTable->construct(); + ODbaseTables_BASE_BASE::appendByDescriptor(Reference< XPropertySet >(*pTable,UNO_QUERY)); + } + } + catch(SQLException&) + { + throw; + } + catch(Exception&) + { + throw SQLException(); } } } |