472,119 Members | 1,640 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,119 software developers and data experts.

the insert statement conflicted with the foreign key constraint fk_

11
i have two tables projects and proposals
in project I have column ID and in proposal I have column ID too and there is a one to one realtionship between these tables the primary key in this realtion is the project.ID and foreign key is in proposal.ID
and thses tow column proposal.ID and project.id does not allow null.
the problem is there is an erorr while I'm trying to insert to proposal table the error is:
the insert statement conflicted with the foreign key constraint "fk_PRoposal_project" the conflict occured in data base "Sc" table "dbo.project" , column 'ID'please help with problem
Thank you...
Aug 10 '10 #1

✓ answered by NeoPa

Hi Bougie. Welcome to Bytes!

You say you have a 1:1 relationship defined. Are you sure? This is quite unusual. Are you sure you don't mean a 1:Many relationship (which is far more common)?

When providing an error for help, it is never much good to supply just the error message. It's important to provide it of course, but we would generally need some sort of indication of exactly what is going on when it occurred. Only you know your situation but I would expect the T-SQL that was running when it occurred would be a bare minimum. Data may be required depending on the specific problem.

1 3693
NeoPa
32,497 Expert Mod 16PB
Hi Bougie. Welcome to Bytes!

You say you have a 1:1 relationship defined. Are you sure? This is quite unusual. Are you sure you don't mean a 1:Many relationship (which is far more common)?

When providing an error for help, it is never much good to supply just the error message. It's important to provide it of course, but we would generally need some sort of indication of exactly what is going on when it occurred. Only you know your situation but I would expect the T-SQL that was running when it occurred would be a bare minimum. Data may be required depending on the specific problem.
Aug 10 '10 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

2 posts views Thread by Geoffrey KRETZ | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.