diff --git a/connectivity/source/drivers/firebird/FDriver.cxx b/connectivity/source/drivers/firebird/FDriver.cxx index e55a1bcfda5f..7f7b44a1a362 100644 --- a/connectivity/source/drivers/firebird/FDriver.cxx +++ b/connectivity/source/drivers/firebird/FDriver.cxx @@ -147,7 +147,10 @@ sal_Bool SAL_CALL FirebirdDriver::acceptsURL( const ::rtl::OUString& url ) { // here we have to look if we support this url format // change the URL format to your needs, but please aware that the first on who accepts the URl wins. - return url.startsWith("sdbc:firebird:"); + // This could be extended to allow for external dbs using e.g. sdbc:firebird:url + // in addition to embedded dbs. +// return url.startsWith("sdbc:firebird:"); + return url.equals("sdbc:embedded:firebird"); } // -------------------------------------------------------------------------------- Sequence< DriverPropertyInfo > SAL_CALL FirebirdDriver::getPropertyInfo( const ::rtl::OUString& url, const Sequence< PropertyValue >& info ) throw(SQLException, RuntimeException) diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 0c02d64d6949..806e117bbd84 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -206,6 +206,7 @@ OUString ODsnTypeCollection::getDatasourcePrefixFromMediaType(const OUString& _s bool ODsnTypeCollection::isShowPropertiesEnabled( const OUString& _sURL ) const { return !( _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:embedded:hsqldb",sizeof("sdbc:embedded:hsqldb")-1) + || _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:embedded:firebird",sizeof("sdbc:embedded:firebird")-1) || _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:outlook",sizeof("sdbc:address:outlook")-1) || _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:outlookexp",sizeof("sdbc:address:outlookexp")-1) || _sURL.matchIgnoreAsciiCaseAsciiL("sdbc:address:mozilla:",sizeof("sdbc:address:mozilla:")-1) @@ -321,7 +322,11 @@ OUString ODsnTypeCollection::getEmbeddedDatabase() const } } if ( sEmbeddedDatabaseURL.isEmpty() ) +#ifdef ENABLE_FIREBIRD_SDBC + sEmbeddedDatabaseURL = "sdbc:embedded:firebird"; +#else sEmbeddedDatabaseURL = "sdbc:embedded:hsqldb"; +#endif return sEmbeddedDatabaseURL; } //------------------------------------------------------------------------- @@ -361,6 +366,9 @@ DATASOURCE_TYPE ODsnTypeCollection::determineType(const OUString& _rDsn) const if (sDsn.equalsIgnoreAsciiCase("sdbc:embedded:hsqldb")) return DST_EMBEDDED_HSQLDB; + if (sDsn.equalsIgnoreAsciiCase("sdbc:embedded:firebird")) + return DST_EMBEDDED_FIREBIRD; + // find second : nSeparator = sDsn.indexOf(static_cast(':'), nSeparator + 1); if (-1 == nSeparator) @@ -489,6 +497,7 @@ void ODsnTypeCollection::fillPageIds(const OUString& _sURL,::std::vector 0;