>Thanks, that will be useful. What I cant figure out is how to bypass the trigger failed. Basically, I just want to automatically revert and then display a brief wait window message with timeout.
In my case, the framework takes care of that, and shows some weird error message, therefore I intercept an error condition before the trigger fires. Specifically, a user-friendly translation of "trigger failed" is not enough; I also want to show the user in which table there are related data.
Otherwise, I think it can be done in the error handling; but I am not so sure about the details.
I think the idea is to use buffering; save data with TableUpdate(); check the return value of TableUpdate(); and if it fails, use aerror() to get error details.
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)