Access 2000 Autonumber Corruption
From: Jim Rodgers (JimRodgers_at_discussions.microsoft.com)
Date: 01/13/05
- Next message: Brendan Reynolds: "Re: Access 2000 Autonumber Corruption"
- Previous message: SomeoneKnows: "datagrid updating from join to single table"
- Next in thread: Brendan Reynolds: "Re: Access 2000 Autonumber Corruption"
- Reply: Brendan Reynolds: "Re: Access 2000 Autonumber Corruption"
- Reply: Brian Morris: "Re: Access 2000 Autonumber Corruption"
- Messages sorted by: [ date ] [ thread ]
Date: Thu, 13 Jan 2005 08:17:06 -0800
I've been using MDB files for things like this for nearly a decade. But this
is something new — and quite troublesome.
I have a small workgroup application written in VB6 using ADO where the mdb
file is on a WinXP/Pro and the clients once were all Win98SE. Everybody had
MDAC 2.8 and every other update I could think of. Things were mostly good.
Then XP/SP2 comes along, and to confuse matters completely, one of my W98SE
client machines is replaced with XP/Pro/SP2 right when the server was also
updated to SP2. Then another, and then one more is upgraded to XP/Home.
"About" the same time as these changes were made, I started getting
corruption of the autonumber primary key field in one of the tables.
It always happens in the same table. It is possible that it only happens
when the XP/Pro client is using the application, but this also might not be
true. It's hard to tell with these particular users because they don't
always report the problem promptly (because they think it's their fault and
they don't want to get in trouble).
The corruption is this: the autonumber field rollsback to an already used
value, thus causing prinary key errors on subsequent .AddNew/.Update
attempts. It's the damnedest thing!
Repair or Repair/Compact (either from Access 2000 or through VB6 using JRO)
does not fix the corruption. One must copy the data to a new table, delete
the old one, and rename, etc.
I am using ADO transactions around each critical step in the procedure where
corruption occurs. The .BeginTrans and .CommitTrans/.RollbackTrans "pairs"
are well-understood: I don't believe I have any sneak paths here. It is
POSSIBLE that the corruption occurs only subsequent to a .Rollback from the
XP client, but this is not certain and may be a red herring.
Typically, there is only one user running this procedure at any time, and
the problem is known to occur when this is the case.
********* HHHeeeeeeeeelllllllllppppp! *********
- Jim
-- James W. (Jim) Rodgers, P.E. Senior Consultant General Consulting Engineers, LLC Atlanta, GA
- Next message: Brendan Reynolds: "Re: Access 2000 Autonumber Corruption"
- Previous message: SomeoneKnows: "datagrid updating from join to single table"
- Next in thread: Brendan Reynolds: "Re: Access 2000 Autonumber Corruption"
- Reply: Brendan Reynolds: "Re: Access 2000 Autonumber Corruption"
- Reply: Brian Morris: "Re: Access 2000 Autonumber Corruption"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|