Kaydet (Commit) 032a3e37 authored tarafından Tamas Bunth's avatar Tamas Bunth Kaydeden (comit) Tamás Bunth

Firebird: Revert not closing cursor,..

..but suppress error of closing closed cursor

Change-Id: I58f96f02f3f600a089bde361ed3e46a03a4902d4
Reviewed-on: https://gerrit.libreoffice.org/46141Reviewed-by: 's avatarTamás Bunth <btomi96@gmail.com>
Tested-by: 's avatarTamás Bunth <btomi96@gmail.com>
üst 95a72981
......@@ -250,6 +250,21 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
if (m_xResultSet.is()) // Checks whether we have already run the statement.
{
disposeResultSet();
// Closes the cursor from the last run.
// This doesn't actually free the statement -- using DSQL_close closes
// the cursor and keeps the statement, using DSQL_drop frees the statement
// (and associated cursors).
aErr = isc_dsql_free_statement(m_statusVector,
&m_aStatementHandle,
DSQL_close);
if (aErr)
{
// Do not throw error. Trying to close a closed cursor is not a
// critical mistake.
OUString sErrMsg = StatusVectorToString(m_statusVector,
"isc_dsql_free_statement: close cursor");
SAL_WARN("connectivity.firebird", sErrMsg);
}
}
aErr = isc_dsql_execute(m_statusVector,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment