I'm trying to create a foreign key in a SQL Compact database but I keep getting the error message "A foreign key value cannot be inserted because a corresponding primary key value does not exist."
TableA is referencing TableB already and I'm trying to create a reference from TableC using the same primary key in TableB. Since I already have a reference to TableB there has to be a valid primary key in that table.
I've double checked and tripple checked the keys and datatypes of all field so I'm stumped.
I've tried to use both the gui option in Visual Studio 2008 and using a SQL command.