You're absolutely right about "just to provide a unique value", and it's not
REALLY important WHAT is this value. I usually want to restart it when I've
finished tests and DB is ready to "production". Really not a problem if it
doesn't start with "1"...
Another case is "reusing" the DB in other site, or a similar DB. I've
created a good MONITOR SYSTEM and I have a pannel where I see my visitors,
and this Monitor shows "visitor number" using this autonumber field.
Sometimes I adapt this code to another site. OK... I should have a "FRESH"
DB copy, ready to install. Not bad to build the query you suggested, but it
would be really good if it was not necessary.
Thank you, Ken...
-----Mensagem original-----
De: Ken Schaefer [mailto:ken@a...]
Enviada em: quinta-feira, 2 de janeiro de 2003 00:19
Para: Access ASP
Assunto: [access_asp] Re: RES: RE: How can I restart autonumber field?
Are the fields related on the autonumber field? If so, you're SOL. You could
write a query that:
a) drops the relationships
b) moves *all* the records, in all the tables (make sure you use ORDER BY!!)
c) renames all the tables
d) recreates the relationships
But, I'd question *why* you want to do this. Surely an autonumber is just
there to provide a unique value. Why do you need it to start at 1?
Cheers
Ken
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
From: "Elildo Mancebo Reis" <lists@a...>
Subject: [access_asp] RES: RE: How can I restart autonumber field?
: That's what I usually do. Not good when there are relations :))
:
: Thank you, anyway...
:
: Elildo Mancebo Reis - from Brazil
:
: -----Mensagem original-----
: De: Carl E. Olsen [mailto:carl-olsen@m...]
: Enviada em: sabado, 28 de dezembro de 2002 12:35
: Para: Access ASP
: Assunto: [access_asp] RE: How can I restart autonumber field?
:
:
: Copy the table and paste it into access. Delete the original table and
: then rename the copy to the name of the original.
:
: > -----Original Message-----
: > From: Elildo Mancebo Reis [mailto:lists@a...]
: > Sent: Saturday, December 28, 2002 8:20 AM
: > To: Access ASP
: > Subject: [access_asp] How can I restart autonumber field?
: >
: > Hi, all!
: >
: > After testing my pages I want to delete all records and set autonumber
: > field
: > "seed" to 1. How can I do it in Access?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~