[AccessD] Problem Writing to table
Rocky Smolin
rockysmolin at bchacc.com
Thu Oct 20 14:53:18 CDT 2016
Dear List:
This is a problem with an mdb running on A2010. Although I don't think that
may be relevant.
I am getting an error 3022: The changes you requested to the table were not
successful because they would create duplicate values in the index, primary
key, or relationship."
The scenario:
I have a table (Table 1) I need to operate on and depending on the record,
either add some records to Table 1 right after the record in question or
just go on to the next record.
The added records have to be in a specific order merged with the existing
records - can't just add to the end of the Table 1. So I copy all the
records to a temp table (Table 2), which has the identical structure as the
Table 1.
Both tables have autonumber PKs. Both table have identical structures.
Except for the PK no fields are indexed. When I copy from Table 1 to Table
2, I select all the fields in Table 1 except for the PK.
Then I loop through Table 2 table either 1) adding the record from Table 2
to Table 1 using an INSERT statement, or add some additional records to
Table 1 and do not copy the record from Table 2 to Table 1.
After about 60 or so records added to Table 2, I get the error.
Since the only indexed field is the autonumber PK, I can't see how a
duplicate value could be generated. But it is. So that means something
else is going on here but I can't imagine what.
Has anyone encountered this before or have any ideas how to get around it?
MTIA
Rocky Smolin
Beach Access Software
760-683-5777
<http://www.bchacc.com> www.bchacc.com
<http://www.e-z-mrp.com> www.e-z-mrp.com
Skype: rocky.smolin
More information about the AccessD
mailing list