I am making a form that reads/writes to a table called Contract. Contract has a field called BuyerID, which is used to store the PK of a record in the Organization table, OrganizationID. When I first tried saving my form, I got the following exception:
The record can't be added or changed. Referential integrity rules require a
related record in table 'Organization'.
The transaction ended in the trigger.
The batch has been aborted.
When I choose a value for the field that gets assigned to BuyerID, I don't get an exception. I don't want this field to be required, so I need to remove the referential integrity rule.
I thought there must be a foreign key constraint specifying that BuyerID points to Organization.OrganizationID. However, running
EXEC sp_help 'Contract'
shows that the only constraint for BuyerID is a default value of 0. Any ideas on how to remove the referential integrity rule?
View Complete Post