By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
462,368 Members | 692 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 462,368 IT Pros & Developers. It's quick & easy.

Key violations when running mdb query against linked SQL

P: 1
I have an MDB on my PC with 3 linked tables to a SQL database. I only have
permissions on the SQL db to insert and delete records.
The linked tables are LnktblA, LnktblB, LnktblC and the main MDB tables are tblA, tblB, tblC. is (<-- one to many --oo)

The relationships in SQL LnktblA<----ooLnktblB<----ooLnktblC.
The relationships in mdb tblA<----ootblB<----ootblC.

All relationships have: (SQL and MDB)
Enforced relationship for replication
Enforced relationship for INSERTs and UPDATEs

I can run an Append query from tblA into LnktblA without any problems. Once I try to run an Append query from tblB into LnktblB I run into "key violations".
Basicly trying to make the linked tables from SQL hold the same data as the main tables in my MDB. The main tables in the MDB have enforced relationship and work perfectly.

So why can't I update the linked tables from the SQL db?

Thank you.
Sep 18 '06 #1
Share this Question
Share on Google+
1 Reply

P: 12
Hi Jason

The error you are seeing "key violations" relates to the primary key in the table you are trying to update. Have a look at that table and find the primary key field. Your update query is trying to write data into this field that either already exists, is null or violates the uniqueness (is that a word?) of the field. Remember in a primary key field every value in this field must be unique.
Sep 22 '06 #2

Post your reply

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