Subject Re: [firebird-support] On Delete triggers and referential integrity
Author Helen Borrie
At 12:28 PM 17/06/2003 +0200, you wrote:

> >
> >Well, you CAN write a BEFORE DELETE trigger - but on the
> >other hand, a FK will allow you to raise an error if there's a
> >detail record as well. This, btw, is the default.
>
>Thanks, this is exactly what I am looking for - do I have to write anything
>into the metadata, or will it raise its own exception?

RI constraints write their own triggers when you define them, and raise
their own exceptions when you violate them. Have your application trap the
exception by the gdscode that's returned in the error status array.

heLen