How to empty a database

R

Rock

Hi,

I have been creating a dbase and think I may have some entries used for
testing.

How can I empty the dbase and know it is?

Thanks
 
V

Van T. Dinh

I assume you are talking about Microsoft Access database???

If this is the case, you can do either:

1. Delete all Records in all Tables and then do a Compact & Repair.

2. Create a new blank database and then import all Access Objects from the
existing database selecting importing Structure only (and not the data). If
you use Startup Options, you need to set these options again in the new
database. Also, check Refereces and add those that you manually added in
the exsiting database.
 
R

Rock

Yes MS Access 2002

Thanks for the answers thus far..

I don't have any entries I want to keep, just in a couple of tables I
have the Primary ID AutoNUmber at 6 instead of 0 and a couple of filed
entries.

I can delete the entries but wonder how to get the AutoNumber back to 0

Thanks again
 
V

Van T. Dinh

When you do a Compact & Repair, the AutoNumber will be reset.

Note that the only purpose of the AutoNumber Field is to provide uniqueness
to each Record in the Table and the values allocated should *not* be matter.
My users don't even see these values. If you attach some meaning to the
value, the AutoNumber Field may not be a suitable data type since it will
develop gaps and can become random or even negative.
 
J

John Vinson

I can delete the entries but wonder how to get the AutoNumber back to 0

An autonumber has one function, and one function ONLY: to provide a
guaranteed-unique key.

It is not designed for human consumption. It won't necessarily start
at 1; it won't necessarily be free of gaps; it can become random (say
if you Replicate your database).

If you want numbers which start at 1 and don't have gaps - use a Long
Integer, not an autonumber, and maintain the value yourself, manually
or with code.

John W. Vinson[MVP]
 
Top