Foriegn_key constraint (help needed urgently)
-
Hi everybody, I'm getting this error. The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Contract_ContractType". The conflict occurred in database "ContractDB", table "dbo.ContractType", column 'ContractTypeId'. The statement has been terminated. I understand that this is because I'm not sending the exact ContracatTypeId to table. I'm doing this deliberately because I want to store Null as well for some reason. Please could any body tell me how can I remove/drop this constraint from database (please bare in mind I have no table diagram). any help will be much appreciated.
-
Hi everybody, I'm getting this error. The INSERT statement conflicted with the FOREIGN KEY constraint "FK_Contract_ContractType". The conflict occurred in database "ContractDB", table "dbo.ContractType", column 'ContractTypeId'. The statement has been terminated. I understand that this is because I'm not sending the exact ContracatTypeId to table. I'm doing this deliberately because I want to store Null as well for some reason. Please could any body tell me how can I remove/drop this constraint from database (please bare in mind I have no table diagram). any help will be much appreciated.
just goto your detail table where your Foreign Key exists , open the table and click on your field which is Foreign Key and right click and click on Relationships , select the specific relationship and on the right side Grid in table designer Set the value for 'Enforce Foregin Key Constraint' to 'No'
Best Of Regards, SOFTDEV If you have knowledge, let others light their candles at it
-
just goto your detail table where your Foreign Key exists , open the table and click on your field which is Foreign Key and right click and click on Relationships , select the specific relationship and on the right side Grid in table designer Set the value for 'Enforce Foregin Key Constraint' to 'No'
Best Of Regards, SOFTDEV If you have knowledge, let others light their candles at it
thanks a lot