Microsoft KB Archive/114676

{|
 * width="100%"|

The information in this article applies to: - Microsoft SQL Server version 4.2 for OS/2 BUG# OS/2: 1819 (4.2)

SYMPTOMS
If 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.

WORKAROUND
Capture the error in the trigger and return it to the calling stored procedure using RAISEERROR.

STATUS
Microsoft 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 INFORMATION
If 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.
 * }

-

Last reviewed: April 29, 1997

© 1998 Microsoft Corporation. All rights reserved. Terms of Use.