summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/misc/WCopyTable.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2005-01-21 16:20:11 +0000
committerKurt Zenker <kz@openoffice.org>2005-01-21 16:20:11 +0000
commitb6ee5ba0f78fb1c5a5867c1aa6d03b3d4454df15 (patch)
treeb2943dba2e8884127b8681f60ef3257b3a357468 /dbaccess/source/ui/misc/WCopyTable.cxx
parent59560e4c13de5787a586ea643f6e58371ecf4c14 (diff)
INTEGRATION: CWS dba22 (1.38.28); FILE MERGED
2005/01/03 12:48:48 oj 1.38.28.1: #i39686# set catalog and schema when needed
Diffstat (limited to 'dbaccess/source/ui/misc/WCopyTable.cxx')
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx17
1 files changed, 14 insertions, 3 deletions
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx
index 26b6467b77f9..220f3b9c228f 100644
--- a/dbaccess/source/ui/misc/WCopyTable.cxx
+++ b/dbaccess/source/ui/misc/WCopyTable.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: WCopyTable.cxx,v $
*
- * $Revision: 1.38 $
+ * $Revision: 1.39 $
*
- * last change: $Author: rt $ $Date: 2004-10-22 09:06:36 $
+ * last change: $Author: kz $ $Date: 2005-01-21 17:20:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -812,13 +812,24 @@ Reference< XPropertySet > OCopyTableWizard::createTable()
return NULL;
::rtl::OUString sCatalog,sSchema,sTable;
- ::dbtools::qualifiedNameComponents(m_xConnection->getMetaData(),
+ Reference< XDatabaseMetaData> xMetaData = m_xConnection->getMetaData();
+ ::dbtools::qualifiedNameComponents(xMetaData,
m_sName,
sCatalog,
sSchema,
sTable,
::dbtools::eInDataManipulation);
+ if ( !sCatalog.getLength() && xMetaData->supportsCatalogsInTableDefinitions() )
+ {
+ sCatalog = m_xConnection->getCatalog();
+ }
+
+ if ( !sSchema.getLength() && xMetaData->supportsSchemasInTableDefinitions() )
+ {
+ sSchema = xMetaData->getUserName();
+ }
+
m_xDestObject->setPropertyValue(PROPERTY_CATALOGNAME,makeAny(sCatalog));
m_xDestObject->setPropertyValue(PROPERTY_SCHEMANAME,makeAny(sSchema));
m_xDestObject->setPropertyValue(PROPERTY_NAME,makeAny(sTable));