B
Bill Lucas
I have an application that has been in production for
over three years. We recently introduced an Archiving
procedure.
Records are inserted into archive database and deleted
from the production database. The process of archiving
is set inside a transaction so if one step fails it is
all rolled back.
This process is carried out by a series of append queries
and delete queries.
The deletes occur in a parent table (tblPerson) and
cascaded through out several child tables (and if these
tables have child tables the delete is cascaded to those
tables).
tblPerson has a one-to-many relationship with
tblAddress. This relation has the cascade delete set to
true. tblAddress has one other relationship with
tblOrderAdress - also with cascade delete set to true.
Everything works fine except occasionally tblAddress has
its Autonumber value reset. Hence any future inserts
fail since that value alreay exists in tblAddress. Then
number chosen each time appears to be the lowest current
autonumber value in the table.
All other tables also have autonumber PK's and they are
not affected.
Does anyone know what might be going on?
over three years. We recently introduced an Archiving
procedure.
Records are inserted into archive database and deleted
from the production database. The process of archiving
is set inside a transaction so if one step fails it is
all rolled back.
This process is carried out by a series of append queries
and delete queries.
The deletes occur in a parent table (tblPerson) and
cascaded through out several child tables (and if these
tables have child tables the delete is cascaded to those
tables).
tblPerson has a one-to-many relationship with
tblAddress. This relation has the cascade delete set to
true. tblAddress has one other relationship with
tblOrderAdress - also with cascade delete set to true.
Everything works fine except occasionally tblAddress has
its Autonumber value reset. Hence any future inserts
fail since that value alreay exists in tblAddress. Then
number chosen each time appears to be the lowest current
autonumber value in the table.
All other tables also have autonumber PK's and they are
not affected.
Does anyone know what might be going on?