Subject | Re: [ib-support] Avoiding a delete |
---|---|
Author | Martijn Tonies |
Post date | 2002-06-26T15:27:17Z |
Hi,
Try either a BEFORE DELETE trigger that raises an exception
if there are records in Table_Sales or a Referential Constraint
that does this job for you. Check the Language Reference for
this.
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
Try either a BEFORE DELETE trigger that raises an exception
if there are records in Table_Sales or a Referential Constraint
that does this job for you. Check the Language Reference for
this.
Martijn Tonies
InterBase Workbench - the developer tool for InterBase and Firebird
http://www.interbaseworkbench.com
Upscene Productions
http://www.upscene.com
"This is an object-oriented system.
If we change anything, the users object."
> Hi
>
> What is the best way to avoid deleting a record ( a dealer ) from
> Table_Dealer
> if its key_column is Dealer and this is a non-key column in
> Table_Sales.
>
> Ie no delete if the dealer has sales.
>
> Thanks
>
> Rod