summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej J.R. Hunt <andrzej@ahunt.org>2013-08-07 10:39:16 +0100
committerAndrzej J.R. Hunt <andrzej@ahunt.org>2013-08-07 18:23:36 +0100
commit67596ee0b1ad4fa7268488d16ca20ee2d3032d97 (patch)
tree50fe8a99b8f5f031f3943382772a0d4c20f08358
parent38e24914ef87dc3247f736eb67bb17463388707b (diff)
Remove unnecessarily duplicated execute/executeQuery. (firebird-sdbc)
Change-Id: Ic173346c4cac140b9426560af9a9b196d93ec2f5
-rw-r--r--connectivity/source/drivers/firebird/Statement.cxx36
1 files changed, 3 insertions, 33 deletions
diff --git a/connectivity/source/drivers/firebird/Statement.cxx b/connectivity/source/drivers/firebird/Statement.cxx
index 7378e5c707ef..8809330a57c7 100644
--- a/connectivity/source/drivers/firebird/Statement.cxx
+++ b/connectivity/source/drivers/firebird/Statement.cxx
@@ -149,39 +149,9 @@ uno::Reference< XResultSet > SAL_CALL OStatement::executeQuery(const OUString& s
sal_Bool SAL_CALL OStatement::execute(const OUString& sql)
throw(SQLException, RuntimeException)
{
- SAL_INFO("connectivity.firebird", "executeQuery(). "
- "Got called with sql: " << sql);
-
- MutexGuard aGuard(m_pConnection->getMutex());
- checkDisposed(OStatementCommonBase_Base::rBHelper.bDisposed);
-
- XSQLDA* pOutSqlda = 0;
- isc_stmt_handle aStatementHandle = 0;
- int aErr = 0;
-
- aErr = prepareAndDescribeStatement(sql,
- aStatementHandle,
- pOutSqlda);
-
- if (aErr)
- {
- SAL_WARN("connectivity.firebird", "prepareAndDescribeStatement failed" );
- }
- else
- {
- aErr = isc_dsql_execute(m_statusVector,
- &m_pConnection->getTransaction(),
- &aStatementHandle,
- 1,
- NULL);
- if (aErr)
- SAL_WARN("connectivity.firebird", "isc_dsql_execute failed" );
- }
-
- evaluateStatusVector(m_statusVector, sql, *this);
-
- // returns true when a resultset is available
- return sal_False;
+ uno::Reference< XResultSet > xResults = executeQuery(sql);
+ return xResults.is();
+ // TODO: what if we have multiple results?
}
uno::Reference< XConnection > SAL_CALL OStatement::getConnection()