negative Autonumbers

R

RWilly

From some websites i've looked at I understand that negative Autonumbers may
be a problem. I'm doomed to support about 30 remote databases, so I set
Autonumber to Random to avoid confilicts when combining the remote datasets
into a single database.

My questions are
What are the problems, how serious are they, and how likely are they to occur?

Given the situation I sketched above, are there possible solutions (e.g.,
correct existing problems, and then give everyone a block of 50,000,000
numbers?

Why did MS design Autonumber..Random like that if it's aproblem.
TIA
 
R

Rick Brandt

RWilly said:
From some websites i've looked at I understand that negative
Autonumbers may be a problem. I'm doomed to support about 30 remote
databases, so I set Autonumber to Random to avoid confilicts when
combining the remote datasets into a single database.

My questions are
What are the problems, how serious are they, and how likely are they
to occur?

Given the situation I sketched above, are there possible solutions
(e.g., correct existing problems, and then give everyone a block of
50,000,000 numbers?

Why did MS design Autonumber..Random like that if it's aproblem.
TIA

Who says negative AutoNumbers are a problem? I have used random AutoNumbers
quite a bit and have never had an issue with some of them being negative.
 
J

John W. Vinson

From some websites i've looked at I understand that negative Autonumbers may
be a problem.

IME they're only a problem when you expose them to user view, and the only
problems are in the heads of people who freak out at things like -315994271 as
an identifier. I've used random autonumbers extensively (behind the scenes)
with no problems whatsoever.

John W. Vinson [MVP]
 
R

RWilly

Thanks for the replies. I haven't had any trouble with using random
AutoNumbers either, but I was worried I might be setting myself up for future
problems.

The link below is to one of Allen Browne's tips from which I got the
impression that negative Autonumbers may be a problem.I suspect I don't
really understand the full purpose of the function he discusses, at least in
terms of the negative numbers issue.

http://allenbrowne.com/ser-40.html

Thanks again.
 
D

David W. Fenton

IME they're only a problem when you expose them to user view, and
the only problems are in the heads of people who freak out at
things like -315994271 as an identifier. I've used random
autonumbers extensively (behind the scenes) with no problems
whatsoever.

One other issue is if you have improperly designed the data types
when you're storing Autonumbers in other tables. If you have a table
with a small number of records and a sequential Autonumber, you
could get by with storing the data in an Integer field (instead of a
Long Integer). But once you changed to Random Autonumber, you could
easily exceed the Integer fields ability to store the number.

This happened to me just about one month ago, working on an app
started in 1997. For the first time since before the app was
replicated (in 1998) we had to add a new record to a lookup table
with only 4 records in it. It broke part of the app, and it turned
out that this was because one of the tables that stored the value
from this lookup table (RI was not enforced because it didn't need
to be) used an Integer field.

This is the only downside I can think of to Random Autonumbers, and
it's really only going to be an issue when there's a design error to
begin with. The problem could also manifest as overflows in code if
you've declard a variable that handles these values as Integer
instead of Long. But, again, it's a *mistake* in your code --
variable types should match the data types of the fields whose data
they are going to store.
 
J

Jerry Whittle

Setting your autonumbers to random does not ensure that there won't be
duplicates when you combine the 30 remote databases. Greatly reduces the
chances? Yes. Eliminates? No.

You should look a replication.
 

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