Subject | Re: [firebird-support] On Delete triggers and referential integrity |
---|---|
Author | Martijn Tonies |
Post date | 2003-06-17T10:08:40Z |
Hi Tim,
other hand, a FK will allow you to raise an error if there's a
detail record as well. This, btw, is the default.
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com
> I am busy developing an accounts package in Firebird. Because of thenature
> of the application, I have decided to institute strict referentialWell, you CAN write a BEFORE DELETE trigger - but on the
> integrity, and have started by creating tables with foreign keys, cascade
> updates, etc., etc., etc.
>
> In Sybase, I could write a trigger that would fire before a delete, that
> would check to see if there were any records dependant on the FK. If there
> were, it could prevent the delete and pass the user an error message.
>
> How would I do the same in FB?
other hand, a FK will allow you to raise an error if there's a
detail record as well. This, btw, is the default.
With regards,
Martijn Tonies
Database Workbench - the developer tool for InterBase & Firebird
Upscene Productions
http://www.upscene.com