I need help to find the error in a trigger, the syntax is correct and i can add it to my table. however when i insert data in this table through a software i get an error. when i disable the trigger the software can inse开发者_高级运维rt data. the problem is that software doesn't throw any exception. how can i get the exact error, so i will be able to fix that trigger. is there an SQLserver error trace tool ? or Log Thank you very much
the trigger is after INSERT INTO statement if that could help ?
You can use SQL Server Profiler / Trace to trace user error messages.
Probably by far the most common error in triggers is assuming that the inserted
and deleted
tables will only contain 1 row so they then fail when a statement affects multiple rows. Does your trigger code do this?
精彩评论