"(PeteCresswell)" <(E-Mail Removed)> wrote in
news:(E-Mail Removed):
> Per frank:
>> I solved it by deleting the contents of the table and
>>reinserting the records.
>
> I think this uncovers a downside of using AutoNumbers for a PK.
???
This is not a new problem.
It first popped up in Jet 4 shortly after it was released because
Jet 4 was the first version to allow programmatic control of the
Autonumber seed. It was not until Jet 4 SP6 that it was fixed
permanently. My copies of SP6 are from 2002, so the main issue has
been solved for EIGHT YEARS -- I've not seen a single spontaneous
loss of Autonumber seed since SP6, but I did see it more than once
in Jet 4 before SP6.
Now, by exposing the Autonumber seed value to programmatic control,
it did change the way Autonumbers work when you insert data that has
Autonumber values less than the highest value in the field, and
that's annoying, but it's not demonstrably wrong behavior, just
DIFFERENT from how it behaved in the past.
So, I really don't think there's any reason to think there's
something unreliable about Autonumbers. They work slightly
differently then they did before Jet 4 was introduced (more than 10
years ago, I might add), but the change in behavior is arguably a
valid way for things to work.
And the fix is just the same method we had for setting the
Autonumber seed value pre-Jet 4.
Thus, I really think there's not need to get hysterical about it.
--
David W. Fenton
http://www.dfenton.com/
contact via website only
http://www.dfenton.com/DFA/