Showing posts with label relationship. Show all posts
Showing posts with label relationship. Show all posts

Monday, March 26, 2012

problem regarding relationship

this is my diagram http://aspspider.net/vhalexxs/relationship.jpg

here is the error while saving the diagram...

'rco_prodattr' table saved successfully
'rco_prodacc' table
- Unable to create relationship 'FK_rco_prodacc_rco_prodattr1'.
Introducing FOREIGN KEY constraint 'FK_rco_prodacc_rco_prodattr1' on table 'rco_prodacc' 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.

is there a way to create a constrain with cascade delete and update on rco_prodacc, or if not what will be the best possible solution for this.

thanks....

Do not enforce second relationship and maintain it by triggers on rco_prodattr.|||

does trigger also roll back when you perform a rollback transaction command in SQL

|||Rollback command rollbacks the transaction whatever it called from within.sql

Friday, March 9, 2012

problem linking tables

i can 't add tables to an existing relationship. the identifier of each new table is already existant as foreign key in an existing table called 'etablissement' : when i insert the new table and create the link with table 'etablissement' each table become marked with '*' et when i save i get this message :
"
Error ODBC : [Microsoft][ODBC SQL Server Driver][SQL Server]Conflict between
instruction ALTER TABLE and the constraint COLUMN FOREIGN KEY
'FK_etablissement_delegation'. the conflit happened in database
'maintenance', table 'delegation', column 'id_dele'."

nb fields are identic and nonnulls.The table's field where you'd like to set a foreign key(table 'delegation', column 'id_dele') contains an ID that does not exist in the table's field where you'd like to set a PK.