Interbase: Don't error out if closing an already closed cursor
Pick-to: 6.0 5.15 Change-Id: If6964f5ae45c5ca4c0b34e417326fea1f33d7628 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
This commit is contained in:
parent
00505ed2b5
commit
4d3d981144
@ -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