diff options
author | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-27 08:29:34 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@sun.com> | 2010-01-27 08:29:34 +0100 |
commit | bccc0c8633a5f38a4ce45b2cd3efe997b31e0ca1 (patch) | |
tree | db7ad8b395807fdc57fe4ab5b36eff54f8e49c19 /connectivity | |
parent | 769dd897d65e987ae2033a51b5b0ce45a0d60c05 (diff) |
dba33f: don't ask every driver for a tables supplier
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/commontools/dbtools2.cxx | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/connectivity/source/commontools/dbtools2.cxx b/connectivity/source/commontools/dbtools2.cxx index b36ae341c9dc..a0b4ab4e3aa9 100644 --- a/connectivity/source/commontools/dbtools2.cxx +++ b/connectivity/source/commontools/dbtools2.cxx @@ -673,19 +673,9 @@ Reference< XTablesSupplier> getDataDefinitionByURLAndConnection( Reference< XDataDefinitionSupplier > xSupp( xManager->getDriverByURL( _rsUrl ), UNO_QUERY ); if ( xSupp.is() ) + { xTablesSup = xSupp->getDataDefinitionByConnection( _xConnection ); - - // if we don't get the catalog from the original driver we have to try them all. - if ( !xTablesSup.is() ) - { // !TODO: Why? - Reference< XEnumerationAccess> xEnumAccess( xManager, UNO_QUERY_THROW ); - Reference< XEnumeration > xEnum( xEnumAccess->createEnumeration(), UNO_QUERY_THROW ); - while ( xEnum.is() && xEnum->hasMoreElements() && !xTablesSup.is() ) - { - xEnum->nextElement() >>= xSupp; - if ( xSupp.is() ) - xTablesSup = xSupp->getDataDefinitionByConnection( _xConnection ); - } + OSL_ENSURE(xTablesSup.is(),"No table supplier!"); } } catch( const Exception& ) |