Skip to content

Commit

Permalink
Fix for ODBC-170. Error "Attempt to reopen an open cursor" may be rai…
Browse files Browse the repository at this point in the history
…sed in Microsoft Access with Firebird 3
  • Loading branch information
alexpotapchenko committed Jan 5, 2014
1 parent 2c06093 commit 59ea0d0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions IscDbc/IscResultSet.cpp
Expand Up @@ -247,11 +247,11 @@ void IscResultSet::close()
reset();

if (statement)
{
{
statement->deleteResultSet (this);
statement->release();
statement = NULL;
}
}
}

void IscResultSet::deleteBlobs()
Expand Down
16 changes: 8 additions & 8 deletions IscDbc/IscStatement.cpp
Expand Up @@ -549,14 +549,6 @@ void IscStatement::deleteResultSet(IscResultSet * resultSet)

if ( connection )
{
if ( transactionLocal )
{
if ( transactionInfo.autoCommit )
commitLocal();
}
else if ( connection->transactionInfo.autoCommit )
connection->commitAuto();

if ( isActiveCursor )
{
// Close cursors too.
Expand All @@ -565,7 +557,15 @@ void IscStatement::deleteResultSet(IscResultSet * resultSet)
// Cursor already closed or not assigned
if ( statusVector[1] && statusVector[1] != 335544569)
THROW_ISC_EXCEPTION (connection, statusVector);
}

if ( transactionLocal )
{
if ( transactionInfo.autoCommit )
commitLocal();
}
else if ( connection->transactionInfo.autoCommit )
connection->commitAuto();
}
}
}
Expand Down

0 comments on commit 59ea0d0

Please sign in to comment.