Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Conflict with Foreign key constraint

Status
Not open for further replies.

ibethea

MIS
Feb 8, 2002
20
US
what caused the following error? how might it be resolved?

Server: Msg 547, Level 16, State 1, Line 1
UPDATE statement conflicted with COLUMN FOREIGN KEY constraint 'FK_BidProposal_BidDispositionCode'. The conflict occurred in database 'MwbeTsDvlprNew', table 'BidDisposition', column 'BidDispositionCode'.
The statement has been terminated.
 
You tried to insert a row into table BidProposal that the value in column BidDispositionCode did not already exist in table BidDisposition.

Example:
BidDisposition contains code values:
Assigned
Terminated
Fulfilled

And you go to insert a row in table BidProposal that has a BidDispositionCode of "Shredded", your insert will fail because code value "Shredded" doesn't exist in BidDisposition (like the foreign-key constraint says it should).

Chip H.
 
I though that was the case. The bidproposal table has null values, which is not acceptable to the bidDisposition table because the bidDisposition does not accept null values as part of the primary key.

Thanks you Chiph.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top