By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,736 Members | 1,347 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,736 IT Pros & Developers. It's quick & easy.

ForeignKeyConstraint

P: n/a
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
Share this Question
Share on Google+
1 Reply

P: n/a
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.