Auto Number Jump

Discuss the database features
Post Reply
Mickey12
Posts: 75
Joined: Thu Apr 16, 2020 3:07 pm

Auto Number Jump

Post by Mickey12 »

Hi for some reason the auto number in a table jumped from 282 to 44058.
There are no records between these numbers.
Any way to reset?
Thanks
Open Office 4.1.7 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Auto Number Jump

Post by RoryOF »

Are there entries subsequent to 44058?
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Mickey12
Posts: 75
Joined: Thu Apr 16, 2020 3:07 pm

Re: Auto Number Jump

Post by Mickey12 »

no entries after 44058
Open Office 4.1.7 on Windows 10
User avatar
RoryOF
Moderator
Posts: 34618
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Auto Number Jump

Post by RoryOF »

Then, that might be incidental corruption of the data, or imminent disk failure.

282 is 0x001A in hex, 44058 is 0XAC1A - so only one byte needs to have changed.

I cannot make any easy suggestion for a method of correction; if it were me, and I was satisfied that it was a one off occurrence, I would edit the file or the hard disk with a hex editor, but am loath to suggest that to someone unskilled in such low level tasks.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
Mickey12
Posts: 75
Joined: Thu Apr 16, 2020 3:07 pm

Re: Auto Number Jump

Post by Mickey12 »

Ok. Thanks for that. I have backed up. (off machine) Will just continue as is.
Open Office 4.1.7 on Windows 10
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Auto Number Jump

Post by Villeroy »

This should never bother anybody. The database engine decides which number is the next one. If you delete some records, say 1000 to 1999, the next record will be 2000 anyway. This is a good and efficient way of handling things. The auto-IDs should be completely meaningless to the user and administrator. It should be seen as a completely abstract record identifier.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Post Reply