I tried to create a new database diagram (with modified relationships) in one of my databases but got the following error message when I tried to save it.
'Entries' table - Unable to create relationship 'FK_Entries_EntrySummary'. The ALTER TABLE statement conflicted with the FOREIGN KEY constraint "FK_Entries_EntrySummary". The conflict occurred in database "sie-test", table "dbo.EntrySummary".
My problem is that I cannot find a FK constraint called "FK_Entries_EntrySummary" in my Entries table! It's not in the EntrySummary table either. Can anyone explain what might be happening here?
The error message is referencing the constraint you are trying to make...which is named "FK_Entries_EntrySummary", and it can't be created probably because there are some values in the EntrySummary table that doesn't comply with it.
Look in the EntrySummary table and see if you have any values there that are not present in the Entry-table.
Hi Lumbago, You are absolutely correct! There were 3 very old orphaned records in my Entries table for which there was no matching record in the EntrySummary table. It just never occurred to me that the FK constraint causing the error was a new one I was trying to make. I just assumed the error referred to an existing constraint.