Interbase: Don't error out if closing an already closed cursor
Change-Id: If6964f5ae45c5ca4c0b34e417326fea1f33d7628 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> (cherry picked from commit 4d3d981144d810fbf1fe263741d36b07a9227621) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
de74f4fdad
commit
5b3dbd38ca
@ -1060,8 +1060,14 @@ bool QIBaseResult::exec()
|
||||
|
||||
if (ok) {
|
||||
isc_dsql_free_statement(d->status, &d->stmt, DSQL_close);
|
||||
if (d->isError(QT_TRANSLATE_NOOP("QIBaseResult", "Unable to close statement")))
|
||||
QString imsg;
|
||||
ISC_LONG sqlcode;
|
||||
if (getIBaseError(imsg, d->status, sqlcode) && sqlcode != -501) {
|
||||
setLastError(QSqlError(QCoreApplication::translate("QIBaseResult", "Unable to close statement"),
|
||||
imsg, QSqlError::UnknownError,
|
||||
sqlcode != -1 ? QString::number(sqlcode) : QString()));
|
||||
return false;
|
||||
}
|
||||
if (colCount() && d->queryType != isc_info_sql_stmt_exec_procedure) {
|
||||
cleanup();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user