summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2015-05-30 14:33:16 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2015-05-30 17:35:46 +0200
commitccceac2a91204a1f03316fba59ba32946470ef94 (patch)
tree453bda1300318135915ae10ec0073013b34629d1 /dbaccess
parentbd09c6a0ba4ab179e549812d456a1674ab3ae6e8 (diff)
handle getParameters being called before execute()
Change-Id: If81e745ee15df3848c6577a9e979672523718daf
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx14
-rw-r--r--dbaccess/source/core/api/RowSet.hxx2
2 files changed, 11 insertions, 5 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 619f5a71ea89..dcbacf4770ef 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1624,10 +1624,17 @@ void ORowSet::setStatementResultSetType( const Reference< XPropertySet >& _rxSta
_rxStatement->setPropertyValue( PROPERTY_RESULTSETCONCURRENCY, makeAny( nResultSetConcurrency ) );
}
-void ORowSet::impl_makeNewStatement_throw()
+void ORowSet::impl_ensureStatement_throw()
{
OUString sCommandToExecute;
- impl_initComposer_throw( sCommandToExecute );
+ if(m_bCommandFacetsDirty)
+ {
+ impl_initComposer_throw( sCommandToExecute );
+ }
+ else
+ {
+ sCommandToExecute = m_bUseEscapeProcessing ? m_xComposer->getQueryWithSubstitution() : m_aActiveCommand;
+ }
try
{
@@ -1672,8 +1679,7 @@ void ORowSet::impl_makeNewStatement_throw()
Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
{
- if(m_bCommandFacetsDirty)
- impl_makeNewStatement_throw();
+ impl_ensureStatement_throw();
m_aParameterValueForCache.get().resize(1);
Reference< XParameters > xParam( m_xStatement, UNO_QUERY_THROW );
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index 596969d98182..19e50f55ff52 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -197,7 +197,7 @@ namespace dbaccess
*/
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >
impl_prepareAndExecute_throw();
- void impl_makeNewStatement_throw();
+ void impl_ensureStatement_throw();
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > calcConnection(const ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler >& _rxHandler) throw( ::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException );
// free clones and ParseTree. Plus, if _bComplete is <TRUE/>, *all* other associated resources