summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-04-22 09:55:45 +0200
committerobo <obo@openoffice.org>2010-04-22 09:55:45 +0200
commit780c7f22b097bbe709defb7ac70f1a118f294539 (patch)
tree268cf448c590f4dd72f0fc9c76c66cf6c6c1dde5
parent21ae32549e5640e23e289ee3269d3f8d312838b0 (diff)
parent99671d27b08076d2dabfbb989003970c3ed42bd3 (diff)
-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 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));