key violation in append query

H

Helen Martin

I have table A, table B and table C

table A contains contact information with a long integer primary key
called contactID as the first field..

table b stores the relationship between each contact and the
organisation. it contains 3 fields.. its own long interger primary
key, the contactID from the contact table A, and the primary key from
table C which contains is own primary key and a list of the different
relationships...

I am appending records to the contact table and creating matching
records in the relationships table..

I have appended the contact information records to table A
I now want to append all the new contactIDs to table B.. however, I'm
getting a key violation..

the help for key violations says I'm either violating referential
integrity or trying to duplicate a primary key somewhere..

I can't sort it out..

I'm using a query which selects all the new contactids from the contact
table, and trying to append them to the contactID field of table B.. it
should not be violating referential integrity, because, each new record
in the relationship table already has a matching record in the contact
table....

I'm not duplicating any primary keys in either table as I'm not
appending to any key fields.. I believe the relationship table primary
key should just keep incrementing as it adds the new records to that
table...

what am I missing??

Helen
 

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