Mr. Hello_world
Mr. Hello_world

Reputation: 85

OpenOffice Relations between tables

enter image description here

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.

enter image description here

Upvotes: 1

Views: 115

Answers (2)

C.Champagne
C.Champagne

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 Teacherinfrecords before creating a Teacher otherwise the constraints you defined are violated.

Upvotes: 1

Mureinik
Mureinik

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

Related Questions