User: kz Date: 2008-03-05 17:07:08+0000 Modified: dba/dbaccess/source/sdbtools/connection/connectiontools.cxx
Log: INTEGRATION: CWS rptchart01_DEV300 (1.4.32); FILE MERGED 2008/02/13 07:45:17 oj 1.4.32.1: #i85225# impl new method File Changes: Directory: /dba/dbaccess/source/sdbtools/connection/ ==================================================== File [changed]: connectiontools.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/sdbtools/connection/connectiontools.cxx?r1=1.4&r2=1.5 Delta lines: +23 -0 -------------------- --- connectiontools.cxx 2007-11-21 15:45:12+0000 1.4 +++ connectiontools.cxx 2008-03-05 17:07:05+0000 1.5 @@ -57,6 +57,9 @@ #include <comphelper/namedvaluecollection.hxx> #endif +#include <connectivity/dbtools.hxx> +#include <connectivity/statementcomposer.hxx> + #include <algorithm> extern "C" void SAL_CALL createRegistryInfo_ConnectionTools() @@ -70,6 +73,8 @@ //........................................................................ /** === begin UNO using === **/ + using namespace ::com::sun::star; + using namespace ::com::sun::star::uno; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::RuntimeException; using ::com::sun::star::sdb::tools::XTableName; @@ -118,6 +123,24 @@ EntryGuard aGuard( *this ); return new DataSourceMetaData( getContext(), getConnection() ); } + //-------------------------------------------------------------------- + Reference< container::XNameAccess > SAL_CALL ConnectionTools::getFieldsByCommandDescriptor( ::sal_Int32 commandType, const ::rtl::OUString& command, Reference< lang::XComponent >& keepFieldsAlive ) throw (sdbc::SQLException, RuntimeException) + { + EntryGuard aGuard( *this ); + ::dbtools::SQLExceptionInfo aErrorInfo; + Reference< container::XNameAccess > xRet = ::dbtools::getFieldsByCommandDescriptor(getConnection(),commandType,command,keepFieldsAlive,&aErrorInfo); + if ( aErrorInfo.isValid() ) + aErrorInfo.doThrow(); + return xRet; + } + //-------------------------------------------------------------------- + Reference< sdb::XSingleSelectQueryComposer > SAL_CALL ConnectionTools::getComposer( ::sal_Int32 commandType, const ::rtl::OUString& command ) throw (::com::sun::star::uno::RuntimeException) + { + EntryGuard aGuard( *this ); + dbtools::StatementComposer aComposer(getConnection(), command, commandType, sal_True ); + aComposer.setDisposeComposer(sal_False); + return aComposer.getComposer(); + } //-------------------------------------------------------------------- ::rtl::OUString SAL_CALL ConnectionTools::getImplementationName() throw (RuntimeException) --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
