summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@oracle.com>2010-08-24 15:36:19 +0200
committerOcke Janssen [oj] <Ocke.Janssen@oracle.com>2010-08-24 15:36:19 +0200
commit5521d0e17eccd263a154ad11066f07e1575eb806 (patch)
tree6caebb2de286cdffef202c798afe62218327adcb
parent8fe8d81132d3b307e318afc1720dafe4b8fc8b3f (diff)
fs33a: #i113631# use m_sUpdateTableName
-rw-r--r--dbaccess/source/core/api/KeySet.cxx16
1 files changed, 4 insertions, 12 deletions
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index c5dfe43b7..eb1699f33 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -198,16 +198,9 @@ void OKeySet::initColumns()
m_pForeignColumnNames.reset( new SelectColumnsMetaData(bCase) );
}
void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
- ,const Reference<XDatabaseMetaData>& i_xMeta
+ ,const Reference<XDatabaseMetaData>& /*i_xMeta*/
,const Reference<XNameAccess>& i_xQueryColumns)
{
- ::rtl::OUString sCatalog,sSchema,sTable;
- Reference<XPropertySet> xTableProp(i_aTable,UNO_QUERY);
- Any aCatalog = xTableProp->getPropertyValue(PROPERTY_CATALOGNAME);
- aCatalog >>= sCatalog;
- xTableProp->getPropertyValue(PROPERTY_SCHEMANAME) >>= sSchema;
- xTableProp->getPropertyValue(PROPERTY_NAME) >>= sTable;
-
// first ask the database itself for the best columns which can be used
Sequence< ::rtl::OUString> aBestColumnNames;
Reference<XNameAccess> xKeyColumns = getPrimaryKeyColumns_throw(i_aTable);
@@ -216,9 +209,8 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
const Reference<XColumnsSupplier> xTblColSup(i_aTable,UNO_QUERY_THROW);
const Reference<XNameAccess> xTblColumns = xTblColSup->getColumns();
- const ::rtl::OUString sComposedUpdateTableName = dbtools::composeTableName( i_xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation );
- ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,sComposedUpdateTableName,(*m_pKeyColumnNames),true);
- ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),sComposedUpdateTableName,(*m_pColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aBestColumnNames,m_sUpdateTableName,(*m_pKeyColumnNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,xTblColumns->getElementNames(),m_sUpdateTableName,(*m_pColumnNames),true);
// locate parameter in select columns
Reference<XParametersSupplier> xParaSup(m_xComposer,UNO_QUERY);
@@ -230,7 +222,7 @@ void OKeySet::findTableColumnsMatching_throw(const Any& i_aTable
Reference<XPropertySet> xPara(xQueryParameters->getByIndex(i),UNO_QUERY_THROW);
xPara->getPropertyValue(PROPERTY_REALNAME) >>= aParameterColumns[i];
}
- ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,sComposedUpdateTableName,(*m_pParameterNames),true);
+ ::dbaccess::getColumnPositions(i_xQueryColumns,aParameterColumns,m_sUpdateTableName,(*m_pParameterNames),true);
SelectColumnsMetaData::const_iterator aPosIter = m_pKeyColumnNames->begin();
SelectColumnsMetaData::const_iterator aPosEnd = m_pKeyColumnNames->end();