• An extensive search on the internet has revealed that the functionality I need (getting the parent object that was affected by the action that the trigger fired for) is not available. It has been requested at least as far back as 2006 (by Erland Sommarskog), but it has today still not been made available.

    Erland's bug report was rejected by MS because he requested a change in the behavior of @@procID.

    The same functionality that Erland tried to achieve can however more easily be implemented by adding a single property in the SqlTriggerContext object that indicates the parent object the trigger fired for. i.e. All we need is a single int property "ParentID". Please help getting the message through to Microsoft by voting UP on my Connect feature request:

    https://connect.microsoft.com/SQLServer/feedback/details/768358/a-sqlclr-trigger-should-be-given-the-parent-object-in-the-sqltriggercontext



    Posting Data Etiquette - Jeff Moden[/url]
    Posting Performance Based Questions - Gail Shaw[/url]
    Hidden RBAR - Jeff Moden[/url]
    Cross Tabs and Pivots - Jeff Moden[/url]
    Catch-all queries - Gail Shaw[/url]


    If you don't have time to do it right, when will you have time to do it over?