Skip to content

Commit 69c7457

Browse files
author
Vladimir Tsvigun
committed
- fix bug, Firebird Tracker Key: ODBC-5 SFID: 1449955# Submitted By: faridz
When executing an update sql statement using ::SQLExecDirect and no rows are affected by the update, the driver returns an SQLRETURN code SQL_SUCCESS. Should return SQL_NO_DATA_FOUND instead per ODBC spec.
1 parent 5a52fe3 commit 69c7457

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

OdbcStatement.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -2523,6 +2523,8 @@ SQLRETURN OdbcStatement::executeStatement()
25232523
resultSet->readStaticCursor();
25242524
setCursorRowCount(resultSet->getCountRowsStaticCursor());
25252525
}
2526+
else if ( statement->isActiveModify() && statement->getUpdateCount() <= 0 )
2527+
return SQL_NO_DATA;
25262528

25272529
return SQL_SUCCESS;
25282530
}

0 commit comments

Comments
 (0)