C
Cirene
Can you assist me with this database problem?
I have 4 tables in my db....
Table1 (key: Table1Id)
Table2 (key: Table2Id)
Table3 (key: Table3Id)
Table 4 has these fields:
key: Table4Id
Table1Id (ties it to Table 1)
Table2Id (ties it to Table 2)
Table3Id (ties it to Table 3)
I created these links using VS2008's Database Diagram.
I would like these 3 FK relationships ALL to be CASCADE DELETE
Table1.Table1Id --> Table4.Table1Id
Table2.Table1Id --> Table4.Table2Id
Table3.Table1Id --> Table4.Table3Id
When I try to save the database diagram I get an error stating...
- Unable to create relationship 'FK_....'.
Introducing FOREIGN KEY constraint 'FK_....' on table 'Table4' may cause
cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE
NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint. See previous errors.
Am I doing something wrong? Is it possible to have multiple CASCADE DELETE
rules on 1 table (Table4 in this case)?
Thanks!
I have 4 tables in my db....
Table1 (key: Table1Id)
Table2 (key: Table2Id)
Table3 (key: Table3Id)
Table 4 has these fields:
key: Table4Id
Table1Id (ties it to Table 1)
Table2Id (ties it to Table 2)
Table3Id (ties it to Table 3)
I created these links using VS2008's Database Diagram.
I would like these 3 FK relationships ALL to be CASCADE DELETE
Table1.Table1Id --> Table4.Table1Id
Table2.Table1Id --> Table4.Table2Id
Table3.Table1Id --> Table4.Table3Id
When I try to save the database diagram I get an error stating...
- Unable to create relationship 'FK_....'.
Introducing FOREIGN KEY constraint 'FK_....' on table 'Table4' may cause
cycles or multiple cascade paths. Specify ON DELETE NO ACTION or ON UPDATE
NO ACTION, or modify other FOREIGN KEY constraints.
Could not create constraint. See previous errors.
Am I doing something wrong? Is it possible to have multiple CASCADE DELETE
rules on 1 table (Table4 in this case)?
Thanks!