Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

jumping AutoNumber

Status
Not open for further replies.

bvahan5

Programmer
Jun 11, 2005
63
RU
I do use MS Access 2000, tied with web system.
Recently I noticed that auto-numeration is "jumping", i.e. there are records with ID (the name of AutoNumber field) as
4911
4912
4913

and then it jumps to
4917...

skipping 1 or more consequent numbers.

How does AutoNumber work? Are there any internal DBMS reasons, that cause it to skip some numbers?

I want to track the reason of may be disappeared records.

Thanks for advices.


 
As soon as you put the cursor in a new record area an autonumber is assigned to it and is lost if you cancel the creation.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
2 PHV

I can't see these changes, playing with test table.

I place a cursor on the new record line in different places, then check the auto number values - they never jump.
 
Even when you start to type in a new ield and then change your mind and cancel the creation ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
It will also skip if you try to insert data programmatically that may violate one or more constraints using dao. For example:

sSql = "insert into table blah blah blah"
dbengine(0)(0).execute (ssql), dbfailoneroor

or if you have warnings turned off so you can't catch the exception.

Burglar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top