summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/dlg/adtabdlg.cxx
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2002-10-08 12:44:30 +0000
committerOcke Janssen <oj@openoffice.org>2002-10-08 12:44:30 +0000
commit4af24319d69da65a0fd322073959123dee7d8d31 (patch)
treef4281029f4d2755e9c071fec2c7ff9fe17a5533d /dbaccess/source/ui/dlg/adtabdlg.cxx
parentc409bbbf18b1418ee1a5295c343da9a5cc504928 (diff)
#104063# check if schema is used if not usde as catalog
Diffstat (limited to 'dbaccess/source/ui/dlg/adtabdlg.cxx')
-rw-r--r--dbaccess/source/ui/dlg/adtabdlg.cxx22
1 files changed, 18 insertions, 4 deletions
diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx
index 19889f7ff5b6..86fee8bb08dd 100644
--- a/dbaccess/source/ui/dlg/adtabdlg.cxx
+++ b/dbaccess/source/ui/dlg/adtabdlg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: adtabdlg.cxx,v $
*
- * $Revision: 1.15 $
+ * $Revision: 1.16 $
*
- * last change: $Author: oj $ $Date: 2002-10-07 13:06:34 $
+ * last change: $Author: oj $ $Date: 2002-10-08 13:44:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -188,12 +188,26 @@ void OAddTableDlg::AddTable()
}
aTableName = aTableList.GetEntryText(pEntry);
+ Reference<XDatabaseMetaData> xMeta = m_pTableView->getDesignView()->getController()->getConnection()->getMetaData();
// den Datenbank-Namen besorgen
+ if ( !aCatalog.getLength()
+ && aSchema.getLength()
+ && xMeta->supportsCatalogsInDataManipulation()
+ && !xMeta->supportsSchemasInDataManipulation() )
+ {
+ aCatalog = aSchema;
+ aSchema = ::rtl::OUString();
+ }
::rtl::OUString aComposedName;
- ::dbtools::composeTableName(m_pTableView->getDesignView()->getController()->getConnection()->getMetaData(),
- aCatalog,aSchema,aTableName,aComposedName,sal_False,::dbtools::eInDataManipulation);
+ ::dbtools::composeTableName(xMeta,
+ aCatalog,
+ aSchema,
+ aTableName,
+ aComposedName,
+ sal_False,
+ ::dbtools::eInDataManipulation);
// aOrigTableName is used because AddTabWin would like to have this
// und das Ganze dem Container uebergeben
m_pTableView->AddTabWin( aComposedName,aTableName, TRUE );