MS SQL 2008 Trigger Problem
Posted on 2012-08-29
I have a MS SQL 2008 table called tblActivistm which has various fields including a PK field of activist_id
I have created the following trigger:
CREATE TRIGGER trgUpdateActivist
INSERT INTO RMay.tblTriggers (table_name, action, table_id)
SELECT 'Activist', 'U', activist_id
The trigger is created sucesfully.
If I issue a query to update the record, then the query suceeds, and the trigger does it's job.
If I open tblActivist in Visual Studio and change a entry interactivly, I get the following error when I try to save the change:
No row was updated.
The data in row 29 was not committed.
Error Source: Microsoft.VisualStudio.DataTools
Error Message: The row value(s) updated or deleted either do not make the row unique or they alter multiple rows(2 rows).
Correct the errors and retry or press ESC to cancel the change(s).
How do I fix this?