PRB: No Error If UPDATE or DELETE Processes 0 Rows

ID: Q63869


The information in this article applies to:


SYMPTOMS

SQL Server does not report an error when an UPDATE or DELETE statement fails to process any rows.


CAUSE

In SQL Server, an UPDATE or DELETE statement that does not process any rows because of the conditions in the WHERE clause is considered to have executed as intended. The status returned by dbsqlexec() will be SUCCEED, not FAIL. DBCOUNT can be used to determine the number of rows processed by the previous statement.

Additional query words: Windows NT dblib


Keywords          : kbprg SSrvDB_Lib SSrvServer SSrvWinNT 
Version           : 4.2 | 4.2
Platform          : OS/2 WINDOWS 
Issue type        : 

Last Reviewed: March 9, 1999