summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-04-19 11:50:35 +0200
committerOcke Janssen [oj] <Ocke.Janssen@sun.com>2010-04-19 11:50:35 +0200
commit359774a099ca5822c7a337fce27d210d49bb1a0d (patch)
treee78c0ae4c1fcf6fe4b4e1fd1c18379229c7be4bb
parentb4306018bfdfac1db87c7bc9aafaf292d8c35fad (diff)
dba321b: #i110942# use default if key columsn are unknownooo/DEV300_m78
-rw-r--r--dbaccess/source/core/api/KeySet.cxx16
1 files changed, 9 insertions, 7 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 24d519038..2ab840502 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -367,15 +367,17 @@ void OKeySet::construct(const Reference< XResultSet>& _xDriverSet,const ::rtl::O
}
Sequence< ::rtl::OUString> aBestColumnNames;
- if ( aBestRowColumnNames.empty() )
+ if ( !aBestRowColumnNames.empty() )
{
- if ( xKeyColumns.is() )
- aBestColumnNames = xKeyColumns->getElementNames();
- }
- else
aBestColumnNames = Sequence< ::rtl::OUString>(&aBestRowColumnNames[0],aBestRowColumnNames.size());
-
- ::dbaccess::getColumnPositions(xSup->getColumns(),aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames));
+ ::dbaccess::getColumnPositions(xSup->getColumns(),aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames));
+ }
+
+ if (m_pKeyColumnNames->empty() && xKeyColumns.is())
+ {
+ aBestColumnNames = xKeyColumns->getElementNames();
+ ::dbaccess::getColumnPositions(xSup->getColumns(),aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames));
+ }
::dbaccess::getColumnPositions(xSup->getColumns(),xSourceColumns->getElementNames(),m_sUpdateTableName,(*m_pColumnNames));
::dbaccess::getColumnPositions(xSup->getColumns(),aParameterColumns,m_sUpdateTableName,(*m_pParameterNames));