Reputation: 85
I'm making a database in OpenOffice, and I was trying to make a relation between tables, but when I make a form and want to test it, it shows me this error.
Upvotes: 1
Views: 115
Reputation: 5489
It seems that the Teacherinf
record doesn't exist yet when you want to insert your teacher
record.
You have to create your Kids
and Teacherinf
records before creating a Teacher
otherwise the constraints you defined are violated.
Upvotes: 1
Reputation: 311028
You are attempting to insert a value into teacher
, which represents the relation between a teacherinf
and kids
, without first inserting the teacher's details to teacherinf
. This causes a violation of the foreign key, and the insertion to fail.
Upvotes: 1