summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/firebird/FStatement.cxx
diff options
context:
space:
mode:
authorJavier Fernandez <jfernandez@igalia.com>2013-06-04 13:54:48 +0000
committerJavier Fernandez <jfernandez@igalia.com>2013-06-06 09:37:45 +0000
commitc5cc994b731a289843a767e049befea228d1a08c (patch)
treea9779d323404c26f56c7b5c7aa395b7cb562afc3 /connectivity/source/drivers/firebird/FStatement.cxx
parentcebb47241e3a2a075ff214d10c4352c02053d7aa (diff)
Executing again a PreparedStatement.
Change-Id: I10afa596ed0464e14c4fd95d3a7fb687451a10b4
Diffstat (limited to 'connectivity/source/drivers/firebird/FStatement.cxx')
-rw-r--r--connectivity/source/drivers/firebird/FStatement.cxx42
1 files changed, 25 insertions, 17 deletions
diff --git a/connectivity/source/drivers/firebird/FStatement.cxx b/connectivity/source/drivers/firebird/FStatement.cxx
index 6d3a9ed3c789..f540624dbb99 100644
--- a/connectivity/source/drivers/firebird/FStatement.cxx
+++ b/connectivity/source/drivers/firebird/FStatement.cxx
@@ -59,6 +59,26 @@ using namespace com::sun::star::container;
using namespace com::sun::star::io;
using namespace com::sun::star::util;
//------------------------------------------------------------------------------
+
+/*
+ * Print the status, the SQLCODE, and exit.
+ * Also, indicate which operation the error occured on.
+ */
+static int pr_error (long* status, char* operation)
+{
+ printf("[\n");
+ printf("PROBLEM ON \"%s\".\n", operation);
+
+ isc_print_status(status);
+
+ printf("SQLCODE:%d\n", isc_sqlcode(status));
+
+ printf("]\n");
+
+ return 1;
+}
+
+//------------------------------------------------------------------------------
OStatement_Base::OStatement_Base(OConnection* _pConnection )
: OStatement_BASE(m_aMutex),
OPropertySetHelper(OStatement_BASE::rBHelper),
@@ -108,6 +128,11 @@ void OStatement_BASE2::disposing()
free(m_INsqlda);
}
+ ISC_STATUS_ARRAY status; // status vector
+ if (isc_dsql_free_statement(status, &m_STMTHandler, DSQL_drop))
+ if (pr_error(status, "fetch data"))
+ return;
+
dispose_ChildImpl();
OStatement_Base::disposing();
}
@@ -172,23 +197,6 @@ sal_Bool SAL_CALL OStatement_Base::execute( const ::rtl::OUString& sql ) throw(S
}
// -------------------------------------------------------------------------
-/*
- * Print the status, the SQLCODE, and exit.
- * Also, indicate which operation the error occured on.
- */
-static int pr_error (long* status, char* operation)
-{
- SAL_WARN("connectivity.firebird", "=> OStatement_Base static pr_error().");
-
- isc_print_status(status);
-
- SAL_WARN("connectivity.firebird", "=> OStatement_Base static pr_error(). "
- "PROBLEM ON " << operation << ". "
- "SQLCODE: " << isc_sqlcode(status) << ".");
-
- return 1;
-}
-
Reference< XResultSet > SAL_CALL OStatement_Base::executeQuery( const ::rtl::OUString& sql ) throw(SQLException, RuntimeException)
{
SAL_INFO("connectivity.firebird", "=> OStatement_Base::executeQuery(). "