diff options
author | obo <obo@openoffice.org> | 2010-04-22 09:55:45 +0200 |
---|---|---|
committer | obo <obo@openoffice.org> | 2010-04-22 09:55:45 +0200 |
commit | 780c7f22b097bbe709defb7ac70f1a118f294539 (patch) | |
tree | 268cf448c590f4dd72f0fc9c76c66cf6c6c1dde5 | |
parent | 21ae32549e5640e23e289ee3269d3f8d312838b0 (diff) | |
parent | 99671d27b08076d2dabfbb989003970c3ed42bd3 (diff) |
CWS-TOOLING: integrate CWS dba321booo/OOO320_m19ooo/OOO320_m18ooo/OOO320_m17ooo/OOO320_m16
-rw-r--r-- | dbaccess/source/core/api/KeySet.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx index 581af61c8..f277179f8 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)); |