FIX: INSERT Into w/ IDENTITY Col Inside Trigger Causes AVLast reviewed: May 1, 1997Article ID: Q136534 |
The information in this article applies to:
SYMPTOMSAn INSERT INTO a table with an IDENTITY column inside a trigger can cause a handled access violation (AV).
CAUSEThe AV occurs only if the table with an IDENTITY column has a trigger. The trigger may be fired by either an INSERT, DELETE, or UPDATE operation. The client does not cause an AV when a SELECT INTO operation is performed on a table that is not using the IDENTITY property.
WORKAROUNDIf your purpose in performing an INSERT operation inside a trigger is to implement Unique Increasing key values without using the IDENTITY property of SQL Server version 6.0, then please refer to the following article in the Microsoft Knowledge Base:
ARTICLE-ID: Q75164 TITLE : Implementing a Unique, Increasing Key ValueIf your objective is to implement Declarative Referential Integrity (DRI), use the DRI feature of SQL Server version 6.0, or implement it by using tables without IDENTITY columns. Refer to the SQL Server "Transact-SQL Reference" manual for details on DRI implementation with triggers.
STATUSMicrosoft has confirmed this to be a problem in Microsoft SQL Server version 6.0. This problem was corrected in Service Pack 2 for SQL Server version 6.0. For more information, contact your primary support provider.
|
Additional query words: sql6 identity primary keys
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |