Article ID: 176092
Article Last Modified on 3/14/2006
APPLIES TO
- Microsoft SQL Server 6.5 Standard Edition
This article was previously published under Q176092
BUG #: 17426 (6.5)
SYMPTOMS
On a second insert into a table that has a text field, you receive the following message:
When this problem occurs, there will also be a handled access violation (AV) with a stack trace in the SQL Error Log.
A second insert into a table with the same value for the primary key may cause a handled exception that closes the client connection to the server if all of the following conditions are true:
- The table has a text column.
- The table has a trigger.
- The trigger queries another table to determine the correct primary key value for the original table.
- Another table has a foreign key reference to the original table.
WORKAROUND
The conditions described in the SYMPTOMS section of this article are really a means to create an ascending or descending key value. To work around this problem, use either of the following two more efficient ways to create an ascending or descending key value:
- Use an IDENTITY column on the original table. or
- Use a stored procedure that picks up the new primary key before inserting into the first table. Remove the trigger from the first table.
STATUS
Microsoft has confirmed this to be a problem in SQL Server 6.5. This problem has been corrected in Service Pack 5a for Microsoft SQL Server 6.5.For more information, click the following article number to view the article in the Microsoft Knowledge Base:
197177 INF: How to Obtain SQL Server 6.5 Service Pack 5a
For more information, contact your primary support provider.
MORE INFORMATION
Additional query words: terminate terminates quits quit stop stops
Keywords: kbbug kbfix kbusage KB176092