long integer field (AutoNumber)

M

michael

I have a long integer set to increment automatically (AutoNumber).

Wondering, what is the exact type of a long integer in access? Is it a
signed 4 bytes value ( -2^31 to 2^31 - 1)?

What happens if it reach its limit at 2^31 -1? Does it go on with
-2^31 or with 1 (if older records deletet) or ...?

Thanks for your help.

Michael
 
D

Douglas J Steele

Yes, the standard AutoNumber is a long integer, so it can have values
from -2,147,483,648 to 2,147,483,647.

Once it hits 2,147,483,647, it will rollover to -2,147,483,648. Of course,
you'd have to have inserted an AWFUL lot of records before that will occur!

For what it's worth, though, you shouldn't care about the values of the
AutoNumber field. AutoNumbers exist for one purpose only: to provide a
(practically guaranteed) unique value that can be used as a primary key.
It's rare to even show the value assigned to your users. If you're trying to
attach some meaning to the value, you probably shouldn't be using an
AutoNumber.
 
M

michael

Thanks for your helpful reply.

By the design the application have to support access as well. Of course
we recommend other db like ms sql but we want also support access.
Therefore I have to take care about its implementation. And yes, it is
a awful amount of log data.

Once again, thanks for your answer.
 
J

John Vinson

And yes, it is a awful amount of log data.

If you're adding ten records per second, 24/7, no downtime, you'll hit
the wrap point in some 6.8 years. Then you'll need another 6.8 before
it creates the first duplicate. I rather doubt that this will be a
major issue in 2018... <g>

John W. Vinson[MVP]
 
M

michael

Actually our customers collect event logs from large server farms. And
it is not uncommon that a single domain controller caused more than 100
events per second if auditing on a high level. However there are many
other issues like performance issue, with access.

My initial question is answered and I workaround this in the
application. Thanks for your comment.

Michael
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top