Microsoft KB Archive/288969

= BUG: Can't Insert into Views That Have INSTEAD OF Trigger in Enterprise Manager =

Article ID: 288969

Article Last Modified on 10/3/2003

-

APPLIES TO


 * Microsoft SQL Server 2000 Standard Edition

-



This article was previously published under Q288969



BUG #: 351731 (SHILOH)



SYMPTOMS
SQL Server Books Online states that it is possible to insert values for timestamp, identity, and computed columns in views that have INSTEAD OF triggers defined on them.

If you attempt to do this in Enterprise Manager, you receive the following error message:

Cannot edit this cell



WORKAROUND
To work around this problem, use Query Analyzer to insert into the these columns.



STATUS
Microsoft has confirmed this to be a problem in SQL Server 2000.



Steps to Reproduce Behavior
  Create a table with an identity column as follows: CREATE TABLE myTab( c1 int, c2 int identity(1,1))   Create a view that reads from the table: CREATE VIEW myView as       SELECT * FROM myTab   Create an INSTEAD OF insert trigger on the view: CREATE TRIGGER myTrig ON myView INSTEAD OF INSERT AS      INSERT INTO myTab(c1) SELECT c1 FROM inserted  In Enterprise Manager, right-click the view, point to Open View, and select Return all rows. In the new window, if you attempt to insert into the identity column, the error message is displayed.</li></ol>

Additional query words: Enterprise Manager, Trigger

Keywords: kbbug kbpending KB288969

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.