No, you dont have to be able to do this. Or so microsoft say.
This is an 'accepted' problem with MSSQL - all I can say is "live with it". the only
way around it is:
begin transaction
delete from child where parentid = X
delete from parent where parentID = X
commit transaction
Sorry. Thats one spot where IB REALLY shines.
N
On 25/02/2000 15:01:54, "Donovan J. Edye" blurted out...
>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
>
--
Nic Wise - Human (just)
ph: 09.277.5309 / cell: 021.676.418 / em: [EMAIL PROTECTED]
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz