StrataFrame Forum

SQL 2008 R2 - "Enforce Foreign Key Constraint"

http://forum.strataframe.net/Topic32234.aspx

By William Fields - 10/17/2013

Hello,

In the SQL 2008 R2 GUI for Foreign Key Relationships, it has an "Enforce Foreign Key Constraint" option. What is the equivalent in the "new relationship" builder in DDT v7.6.0?

Reason I'm asking is that the "Enforce relationships for INSERTS AND UPDATES" option in the DDT will disable the delete and update rule comboboxes, but the "Enforce Foreign Key Constraint" in SQL does not disable the "INSERT and UPDATE Specification" options. So I'm confused if they are the same or not.

Thanks.
By StrataFrame Team - 10/18/2013

Yes, they are the same option.  The "Enforce relationship for INSERTs and UPDATEs" option in the DDT is the "Enforce Foreign Key Constraint" option in SQL Server Management Studio.  It basically says whether the constraint is on or off.

ALTER TABLE tablename NOCHECK CONSTRAINT foreignKey;

We disabled the combo boxes because we decided that it didn't make sense for the constraint to be off but still cascade the deletes and updates, but it looks like SQL server allows this scenario.