Updating a table with foreign keys

  • Thread starter Thread starter Tony C
  • Start date Start date
T

Tony C

I am trying to update a table wihch has a single Primary key and a number of
foreign key fields - the foreign key fields have properties of: Required =
No, Indexed = Yes (Duplicates OK) and Default value = NULL. When I try to
UPDATE this table supplying the primary key and one or several of the foreign
keys I get a Key violation error. If the FKs allow nulls, I am bemused why
this should occur ? Any ideas anyone ?
The PK I am supplying id definitly unique.
If I dont supply any of the FKs I dont get a key violation and the table
updates.
I am enforcing referential integrity between the primary and foreign key
tables.
 
Are you sure the error is caused by providing no value for some of the
foreign keys? What if you try the update when providing a value for all
foreign keys as a test?

Can you show us the SQL statement of the update query, and tell us about the
tables' structure and relationships?
 
Back
Top