Tag: cws_src680_dba24d User: fs Date: 2007-12-05 15:46:13+0000 Modified: dba/dbaccess/source/ui/uno/copytablewizard.cxx
Log: #i81658# ConnectionInfo File Changes: Directory: /dba/dbaccess/source/ui/uno/ ======================================= File [changed]: copytablewizard.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/uno/copytablewizard.cxx?r1=1.1.2.16&r2=1.1.2.17 Delta lines: +11 -4 -------------------- --- copytablewizard.cxx 2007-11-26 14:23:46+0000 1.1.2.16 +++ copytablewizard.cxx 2007-12-05 15:46:11+0000 1.1.2.17 @@ -4,9 +4,9 @@ * * $RCSfile: copytablewizard.cxx,v $ * - * $Revision: 1.1.2.16 $ + * $Revision: 1.1.2.17 $ * - * last change: $Author: fs $ $Date: 2007/11/26 14:23:46 $ + * last change: $Author: fs $ $Date: 2007/12/05 15:46:11 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -137,6 +137,7 @@ using ::com::sun::star::sdbc::SQLException; using ::com::sun::star::sdb::SQLContext; using ::com::sun::star::sdbc::XDriverManager; + using ::com::sun::star::beans::PropertyValue; /** === end UNO using === **/ namespace CopyTableOperation = ::com::sun::star::sdb::application::CopyTableOperation; namespace CopyTableContinuation = ::com::sun::star::sdb::application::CopyTableContinuation; @@ -886,10 +887,13 @@ if ( xConnection.is() ) break; - // finally, there could be a ConnectionResource + // finally, there could be a ConnectionResource/ConnectionInfo ::rtl::OUString sConnectionResource; + Sequence< PropertyValue > aConnectionInfo; if ( xPSI->hasPropertyByName( PROPERTY_CONNECTION_RESOURCE ) ) OSL_VERIFY( _rxDataSourceDescriptor->getPropertyValue( PROPERTY_CONNECTION_RESOURCE ) >>= sConnectionResource ); + if ( xPSI->hasPropertyByName( PROPERTY_CONNECTION_INFO ) ) + OSL_VERIFY( _rxDataSourceDescriptor->getPropertyValue( PROPERTY_CONNECTION_INFO ) >>= aConnectionInfo ); Reference< XDriverManager > xDriverManager; xDriverManager.set( m_aContext.createComponent( "com.sun.star.sdbc.ConnectionPool" ), UNO_QUERY ); @@ -897,6 +901,9 @@ // no connection pool installed xDriverManager.set( m_aContext.createComponent( "com.sun.star.sdbc.DriverManager" ), UNO_QUERY_THROW ); + if ( aConnectionInfo.getLength() ) + xConnection.set( xDriverManager->getConnectionWithInfo( sConnectionResource, aConnectionInfo ), UNO_SET_THROW ); + else xConnection.set( xDriverManager->getConnection( sConnectionResource ), UNO_SET_THROW ); } while ( false ); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
