>Hi
>
>I am wanting to create a rule that prevents records from being deleted if there are records in a child table. I can do this quite easily via referential integrity but I dont want the standard mesage to display. I believe this can be stopped by buffering the table and using ones own messages but doesn't work with views where the table is not buffered.
>
>Is there a way to prevent the standard error message coming up in all cases?
>
>Regards
>Geoff Scott
You mean the standard message "trigger failed", right?
What I did is create a function that searches for child records, before trying to delete. If there are child records, I show my own message instead. I used the same message for all tables: "The record is being used in table (tablename)".
I don't have the corresponding function available right now, but I can search for it when I am back at home, in about a week, if you are interested.
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)