Updating a table with foreign keys

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.
 
K

Ken Snell \(MVP\)

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top