Re: Restoring deleted autonumber

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Brendan Reynolds (brenreyn)
Date: 08/26/04


Date: Thu, 26 Aug 2004 16:07:36 +0100

There can't be any related records with the deleted value if referential
integrity was enforced.

-- 
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com
The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
"LGC" <nospam@nospam.nospam> wrote in message
news:el3X%23V3iEHA.1140@tk2msftngp13.phx.gbl...
>
> > However, my question would be "Why bother?" An autonumber exists for one
> > reason: to provide a (practically guaranteed) unique value that can be
> used
> > as a primary key. What that value is shouldn't matter: in fact, it's
rare
> > that the value of the autonumber gets displayed.
>
> - To restore the relationship with existing foreign keys?
>
>


Relevant Pages

  • Re: Does each related table have to have their own primary key ass
    ... I agree with Rick Brandt to some extent, and I can't think of any real problems that you might encounter by adding Autonumber fields that you never use, so you perhaps should go ahead and stick them in there and nothing will go wrong, although they will make your Tables slightly larger and require you to name them and keep track of them. ... one such reason for ensuring that all the records are easily distinguishable (by having a unique primary key field in each record) might be that the Table is part of a self-join. ... The reason I ask is that when I was 1st setting up my database I had the 1st table set with a primary key I assigned (policy #) and I set the next table with an autonumber, but I was getting error messages when I was trying to do reports and forms extrapulating data from both tables. ...
    (microsoft.public.access.gettingstarted)
  • Re: DB Normalization
    ... reason for not making the case number the PK is that this field HAS MEANING! ... >>have used a field with REAL data in it as a primary key in my main table. ... > If you want to add an autonumber PK (say because your current PK isn't ...
    (microsoft.public.access.gettingstarted)
  • Re: Numeric vs. Text IDs
    ... Usually performance is cited as a reason to use numeric keys. ... There are 3 tests for a primary key: ... Most of the time, however, I've found that autonumber PKs ...
    (microsoft.public.access.tablesdbdesign)
  • Re: Choosing a primary key
    ... There's no reason that you HAVE to use an autonumber; ... well as a primary key to uniquely identify a record. ... like using it as an invoice number or account ...
    (microsoft.public.access.gettingstarted)
  • Re: Multi-Field Primary Key
    ... Surrogate numeric keys do solve a lot of technical ... problems for database and database application developers and many seasoned ... I recognise *three* uses for autonumber. ... "Although a primary key isn't required, ...
    (microsoft.public.access.tablesdbdesign)