470,627 Members | 2,286 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,627 developers. It's quick & easy.

ForeignKeyConstraint

I keep getting the following message when adding a new record to a database
that has two tables. On table is a parent to the other. I am adding a new
parent record that has child records and I get the following:

ForeignKeyConstraint drtblCDstblSongs requires the child key value(9) to
exist in the parent table. Do you want to correct the value? Is there a
way I can just turn this off since with my program the only way to add a
child is to add the parent at the same time.

Nov 21 '05 #1
1 1578
David A. Osborn wrote:
I keep getting the following message when adding a new record to a database
that has two tables. On table is a parent to the other. I am adding a new
parent record that has child records and I get the following:

ForeignKeyConstraint drtblCDstblSongs requires the child key value(9) to
exist in the parent table. Do you want to correct the value? Is there a
way I can just turn this off since with my program the only way to add a
child is to add the parent at the same time.


You need to add the parent record, then get the value of the foreign
key. then add the child record with using that foreign key. Why do you
want to remove this if it is enforcing your rules?

Chris
Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by oj | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.