Donovan

I have found you either use triggers for RI or declarative RI (i.e FK
Constraints).
With the limited sytax of declarative RI use Triggers (far more flexible)

I don't know if you are using a case tool but I'd strongly recommend one
Get the demo of xCase (www.xcase.com) and play with it
It generates very good RI triggers (copes with multi-record inserts and
deletes)
I then use other triggers for Data Integrity Maint.

Without it it becomes very tedious (sort of like a big project in VB)

Regards
Neven

----- Original Message -----
From: Donovan J. Edye <[EMAIL PROTECTED]>
To: Multiple recipients of list delphi <[EMAIL PROTECTED]>
Sent: Friday, February 25, 2000 3:01 PM
Subject: [DUG]: SQL7 Triggers...


> G'Day,
>
> Just cannot seem to figure this out. What I am doing:
>
> - Have a trigger for a DELETE in Table1
> - In the trigger delete all records from other tables that refer to the
> Table1.Primary key that I am deleting
>
> However unlike Interbase there is no seperate BeforeDelete, AfterDelete
> trigger and as a result as soon as Table1 record gets deleted I get a
> foreign key violation.
>
> You have to be able to do this. What am I missing??
>
> TIA
>
> ------------------------------------------------------------------------
> --Donovan
> Donovan J. Edye [www.edye.wattle.id.au]
> Namadgi Systems, Delphi Developer
> Web: www.namsys.com.au E-Mail: [EMAIL PROTECTED]
> Voice: +61 2 6285-3460 Fax: +61 2 6285-3459
> TVisualBasic = Class(None);
> ------------------------------------------------------------------------
>
> --------------------------------------------------------------------------
-
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to