summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg/DbAdminImpl.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'dbaccess/source/ui/dlg/DbAdminImpl.cxx')
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index 1615881c253f..a4e06a640bff 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -353,6 +353,11 @@ void ODbDataSourceAdministrationHelper::clearPassword()
// -----------------------------------------------------------------------------
Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver()
{
+ return getDriver(getConnectionURL());
+}
+// -----------------------------------------------------------------------------
+Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver(const ::rtl::OUString& _sURL)
+{
// get the global DriverManager
Reference< XDriverAccess > xDriverManager;
String sCurrentActionError = String(ModuleRes(STR_COULDNOTCREATE_DRIVERMANAGER));
@@ -373,11 +378,11 @@ Reference< XDriver > ODbDataSourceAdministrationHelper::getDriver()
throw SQLException(sCurrentActionError, getORB(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")), 0, Any());
- Reference< XDriver > xDriver = xDriverManager->getDriverByURL(getConnectionURL());
+ Reference< XDriver > xDriver = xDriverManager->getDriverByURL(_sURL);
if (!xDriver.is())
{
sCurrentActionError = String(ModuleRes(STR_NOREGISTEREDDRIVER));
- sCurrentActionError.SearchAndReplaceAscii("#connurl#", getConnectionURL());
+ sCurrentActionError.SearchAndReplaceAscii("#connurl#", _sURL);
// will be caught and translated into an SQLContext exception
throw SQLException(sCurrentActionError, getORB(), ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("S1000")), 0, Any());
}