How do I create a virgin DB after testing?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

After creating a database and entering data into it for testing, how do I erase all of the data and keep the structure so it looks new when I deploy it?
 
To answer the question in your subject ---

Don't screw with it and the DB will remain a virgin!

Steve
PC Datasheet


Mitch said:
After creating a database and entering data into it for testing, how do I
erase all of the data and keep the structure so it looks new when I deploy it?
 
Mitch:

What I did was copied each table in my db (structure only), pasted them into
the db with a different name (e.g. table-copy), deleted the original tables
and then renamed the new blank copies with the original names.

HTH

- and -
Steve (lmao!)

Shelly
 
You can create a new mdb, and use File Get External Data, Import to import
all the objects. Click on Options and you'll see you can choose Structure
only, rather than structure and data.

--
Joan Wild
Microsoft Access MVP

Mitch said:
After creating a database and entering data into it for testing, how do I
erase all of the data and keep the structure so it looks new when I deploy
it?
 
I would think that you simply go into the tables and delete all the records.

In fact, you should be running a split mdb anyway. Then you can "switch"
your data set you use for testing at will.

In addition, how are you going to distribute new updates to your code and
forms without disturbing the existing data?

Really, for any serious development in ms-access, you need to split your
database. You can read more about this process at:


http://www.granite.ab.ca/access/splitapp.htm

or

http://www.microsoft.com/accessdev/articles/bapp97/chapters/ba15_3.htm

By using a split arrangement, you can keep a empty backend for distribution,
and use a different back end for testing. That way..you don't even have to
delete your test data!
 
Click once on the table, then Right click to select COPY, then righ
click and select PASTE, you'll have a decision box that you can selec
Structure and data or just structure, leaving you a "virgin" table, i
you keep the same name it'll prompt you to it'll ask you give it
name, it'll write over the existing table if you give it the sam
name.

G
 
Click once on the table, then Right click to select COPY, then righ
click and select PASTE, you'll have a decision box that you can selec
Structure and data or just structure, leaving you a "virgin" table, i
you keep the same name it'll prompt you to it'll ask you give it
name, it'll write over the existing table if you give it the sam
name.

G
 
to delete all the records could be a big task if you have say 1000 records.

how do you run or for that matter create a split mdb?
thank you
 
Open Access
Click on File, New
Go to File, Get External Data, Import
In the dialog that opens, locate your mdb
Select all the tables.
Click on Options
Choose 'Definition Only' under Import tables
Click OK.

This will be your backend database. Put it in a folder on the server that
all users have access to.

Open your original database, delete all the tables in it.
Use File, Get External Data, Link Tables
In the dialog that pops up, find the backend mdb you created above.
Select all the tables, and click OK.

You now have two mdb files - frontend and the backend. You can distribute a
copy of the frontend to each user's workstation.
 
I do that on a regular basis to a prototype system I am working on. There is
about a dozen tables with about 150,000 records each.

When I have a fresh copy of the production data, I delete all the records
being imported, compact the database and load the new data.

The deletion and compaction take less than fifteen seconds. Due to some of
the massaging, the load takes fifteen minutes.

Albert: You forgot to mention to compact the databse.

John... Visio MVP

Need stencils or ideas? http://www.mvps.org/visio/3rdparty.htm
Need VBA examples? http://www.mvps.org/visio/VBA.htm
Common Visio Questions http://www.mvps.org/visio/common_questions.htm
 
Albert said:
*I would think that you simply go into the tables and delete all th
records...
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.attcanada.net/~kallal.msn *

Agree with one exception, if you have an AutoNumber field, it wil
pickup the next number and that wouldn't be a "virgin table
anylonger.

But if you do as I and several others suggested, copy the table and th
paste just the STRUCTURE and no DATA, you'll start out fresh, even wit
the AutoNumber fields if there happen to be any.
G
 
Albert said:
*I would think that you simply go into the tables and delete all th
records...
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
(e-mail address removed)
http://www.attcanada.net/~kallal.msn *

Agree with one exception, if you have an AutoNumber field, it wil
pickup the next number and that wouldn't be a "virgin table
anylonger.

But if you do as I and several others suggested, copy the table and th
paste just the STRUCTURE and no DATA, you'll start out fresh, even wit
the AutoNumber fields if there happen to be any.
G
 
Back
Top