BUG: Trigger Still Fires if NULL Put in NOT NULL ColumnLast reviewed: April 29, 1997Article ID: Q114676 |
The information in this article applies to:
- Microsoft SQL Server version 4.2 for OS/2BUG# OS/2: 1819 (4.2)
SYMPTOMSIf a stored procedure attempts to insert or update a row in a table with a corresponding trigger and the row violates the schema by putting a NULL into a NOT NULL column, the appropriate trigger will still fire and clear the @@error variable so that it cannot be captured in the stored procedure. There is no way of knowing that the INSERT or UPDATE failed.
WORKAROUNDCapture the error in the trigger and return it to the calling stored procedure using RAISEERROR.
STATUSMicrosoft has confirmed this to be a problem in SQL Server version 4.2 for OS/2. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATIONIf any other error occurs, such as a rule violation, the trigger does not fire. If the same commands are put into a script, the trigger does not fire.
|
Additional query words: kernel
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |