Skip to content
Advertisement

Rollback SQL transaction without returning an error

Consider the trigger below

The idea is to stop any changes from being done to a Tasks record if it is tied to a Jobs record that has a value in the QuotationID field.

It works because when these conditions are met, the changes are not saved. However, though, an error is returned to the application that causes it to crash. Unfortunately, the application cannot be updated to ignore such an error because it is running on a very old Windows machine that does not allow newer exe’s to be installed.

Is there a way to set the trigger to NOT return an error when it does a rollback, so that as far as the application is concerned, the change has been saved normally?

Advertisement

Answer

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement