The definition of object 'Trigger_Name' has changed since it was compiled.

  • I am receiving the following error on a trigger:

    [Microsoft][ODBC SQL Server Driver][SQL Server] The definition of object trigger_name' has changed since it was compiled.

    I recently upgraded the database from SQL 2000 to SQL 2005. The trigger works fine in SQL 2000 but in SQL 2005, I get this error. I ran sp_recompile on the trigger to no avail. The trigger is an "instead of delete" trigger. Does anyone know what this message means and/or how to avert it?

    Thanks,

    D.

  • What is your trigger doing?

    This may help http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=816590&SiteID=17&pageid=0

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Here's another: http://www.eggheadcafe.com/forumarchives/SQLServerprogramming/Jan2006/post26057430.asp

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • Thanks for the information. I'll have a look at these two links to see if their solutions will help me.

    I'll try to explain what the trigger does. (I'm sort of new to SQL and database programming so please forgive me if any of this sound like I don't know what I'm talking about.) This trigger is issued when a user tries to delete a record from a "master" table from the application that interfaces the database. A record from this particular table can be associated with records in other tables but can only be deleted if a few particular tables do not have associated records in them. If these particular tables have associated records in them, then a rollback is performed and a error message is generated. If there are no records in these particular tables then a cascading delete is performed by checking the remainging tables for associated records and deleting them. Whew! I'll understand if you didn't follow that! 😉

    Thanks,

    D.

  • Are there any 'ALTER TABLE' statements within the triggers?

    John Rowan

    ======================================================
    ======================================================
    Forum Etiquette: How to post data/code on a forum to get the best help[/url] - by Jeff Moden

  • No, not at all.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply