June 11, 2008 at 12:39 pm
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.
June 11, 2008 at 12:57 pm
What is your trigger doing?
This may help http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=816590&SiteID=17&pageid=0
June 11, 2008 at 12:59 pm
June 11, 2008 at 1:47 pm
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.
June 11, 2008 at 1:50 pm
June 11, 2008 at 2:10 pm
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