diff options
author | Aron Budea <aron.budea@collabora.com> | 2022-11-05 09:58:10 +0100 |
---|---|---|
committer | Aron Budea <aron.budea@collabora.com> | 2022-11-05 09:59:48 +0100 |
commit | d98e9e47bdfcc527af17b903bd6366c79e75c7fa (patch) | |
tree | efbd76d4214e330312d1412191b44df7edc84f25 | |
parent | c87315bd90cad77b20cf4980e83c636082acf11e (diff) |
Partially revert "error when copying table and the copy table...
wizard creates the primary key"
Due to a mis-merge. Only revert the unneeded part.
This partially reverts commit
c87315bd90cad77b20cf4980e83c636082acf11e.
Change-Id: Ibd24a5e8a9cf7be50feb2844a483fc3f9c7fa8bd
-rw-r--r-- | dbaccess/source/ui/uno/copytablewizard.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx index 777ba0288c01..82710895f65a 100644 --- a/dbaccess/source/ui/uno/copytablewizard.cxx +++ b/dbaccess/source/ui/uno/copytablewizard.cxx @@ -1368,6 +1368,17 @@ void CopyTableWizard::impl_doCopy_nothrow() // tdf#119962 const Reference< XDatabaseMetaData > xDestMetaData( m_xDestConnection->getMetaData(), UNO_SET_THROW ); + const OUString sComposedTableName = ::dbtools::composeTableName( xDestMetaData, xTable, ::dbtools::EComposeRule::InDataManipulation, true ); + + OUString aSchema,aTable; + xTable->getPropertyValue("SchemaName") >>= aSchema; + xTable->getPropertyValue("Name") >>= aTable; + Any aCatalog = xTable->getPropertyValue("CatalogName"); + + const Reference< XResultSet > xResultPKCL(xDestMetaData->getPrimaryKeys(aCatalog,aSchema,aTable)); + Reference< XRow > xRowPKCL(xResultPKCL, UNO_QUERY_THROW); + OUString sPKCL; + if ( xRowPKCL.is() ) { if (xResultPKCL->next()) { |