Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 relation problem between tables

Author  Topic 

uniservice
Starting Member

1 Post

Posted - 2012-09-04 : 09:17:28
hi all

i have tables like below

tbl_users:

id , uname , pass , ...

tbl_sp_posters:

id , uid , pid , title , body , ...

tbl_Free_Posters:

id , uid , pid , title , body , ...

tbl_Text_Posters:

id , uid , pid , title , body , ...

tbl_Img:

id , spid , frid , txid , img

users table have relation with (tbl_sp_posters , tbl_Free_Posters , tbl_Text_Posters) tables ,

and Delete Rule , Update Rule is Cascade in these relations.

tbl_Img have relation with (tbl_sp_posters , tbl_Free_Posters , tbl_Text_Posters) tables

but when i'll enable Delete Rule , Update Rule in this relations it give me this error:

Introducing FOREIGN KEY constraint 'FK_tblImg_tblSPPosters' on table 'tblImg' 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.

where is my problem and how i can fix it?
   

- Advertisement -