Click here to Skip to main content
15,881,872 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
In My Contact model having personId as foreign key when i update the model contact.

A referential integrity constraint violation occurred: The property value(s) of 'Person.PersonId' on one end of a relationship do not match the property value(s) of 'Contacts.PersonId' on the other end.
Posted
Updated 9-Mar-18 1:59am
v2

1 solution

PersonId in Person table is a foreign key for the table Contacts.
If you update Contacts with a PersonId that is not in the Person table, you are going to get this error.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900