summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-02-28 18:06:50 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2013-02-28 18:07:20 +0100
commita2db9096e2674bfb1cb125bf6036c990f35579e7 (patch)
treed4012ba3f7e00cf47631f991acb5a7881999883a
parent06768783eac941b619a376a82a1c22066a704911 (diff)
fdo#61203 initialise m_aComposedTableName *before* trying to use it
Change-Id: Ie7a19bdfe9e7bc729a62191362ce0779d73385a0
-rw-r--r--dbaccess/source/core/api/CacheSet.cxx3
-rw-r--r--dbaccess/source/core/api/KeySet.cxx3
2 files changed, 4 insertions, 2 deletions
diff --git a/dbaccess/source/core/api/CacheSet.cxx b/dbaccess/source/core/api/CacheSet.cxx
index 32ffb78437c4..734989b63440 100644
--- a/dbaccess/source/core/api/CacheSet.cxx
+++ b/dbaccess/source/core/api/CacheSet.cxx
@@ -156,10 +156,11 @@ void OCacheSet::fillTableName(const Reference<XPropertySet>& _xTable) throw(SQL
void SAL_CALL OCacheSet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OCacheSet::insertRow" );
- OUStringBuffer aSql("INSERT INTO " + m_aComposedTableName + " ( ");
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
+ OUStringBuffer aSql("INSERT INTO " + m_aComposedTableName + " ( ");
+
// set values and column names
::rtl::OUStringBuffer aValues(" VALUES ( ");
static ::rtl::OUString aPara("?,");
diff --git a/dbaccess/source/core/api/KeySet.cxx b/dbaccess/source/core/api/KeySet.cxx
index 6252eec070cc..f252dc88ea7b 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -728,10 +728,11 @@ void OKeySet::executeUpdate(const ORowSetRow& _rInsertRow ,const ORowSetRow& _rO
void SAL_CALL OKeySet::insertRow( const ORowSetRow& _rInsertRow,const connectivity::OSQLTable& _xTable ) throw(SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen@sun.com", "OKeySet::insertRow" );
- OUStringBuffer aSql( "INSERT INTO " + m_aComposedTableName + " ( ");
Reference<XPropertySet> xSet(_xTable,UNO_QUERY);
fillTableName(xSet);
+ OUStringBuffer aSql( "INSERT INTO " + m_aComposedTableName + " ( ");
+
// set values and column names
OUStringBuffer aValues(OUString(" VALUES ( "));
static OUString aPara("?,");