Using Templates and Sample Databases

G

Guest

I need help. Does anyone know if there is an easy way to use templates? I
need to delete just the sample data from a template downloaded from
Microsoft.com. Is it at all possible to delete just the sample data from a
sample database in Access (i.e. Northwid.mdb)? Seems like this would be
simple to do, but isn't.

Thank you for any help you can give.

Jen0214
 
R

Rick B

It is very easy to do. Just open the tables, select all the records, and
hit delete.

I believe you would only need to do this for about 6 tables (Orders, Order
Details, Products, Shippers, and Suppliers).
 
J

Joan Wild

Backup the database.
Open it and open the Order Details table; hit Ctrl-a and the delete key
Open Orders; hit ctrl-a and then delete.
repeat for Customers, Employees, Shippers, Products, Suppliers, Categories,
in that order.

Since the cascade delete is not set on the relationships among these tables,
you need to start at the many side of any relationship...i.e. you can't
delete Customers until their orders are deleted and you can't delete the
orders until the order details are deleted,etc. If you open the
relationship window in any of the templates, you'll see which table you need
to start with.
 
H

Hunter57

Backup the database.
Open it and open the Order Details table; hit Ctrl-a and the delete key
Open Orders; hit ctrl-a and then delete.
repeat for Customers, Employees, Shippers, Products, Suppliers, Categories,
in that order.

Since the cascade delete is not set on the relationships among these tables,
you need to start at the many side of any relationship...i.e. you can't
delete Customers until their orders are deleted and you can't delete the
orders until the order details are deleted,etc. If you open the
relationship window in any of the templates, you'll see which table you need
to start with.

--
Joan Wild







- Show quoted text -

Here is an easy way to do it.

Create a new blank Database. Then click on the Menu Bar File>Get
External Data>Import. Select the Database you want to copy from.
Click the Tables Tab. Then click on the Options button on the Import
Window. Under Import Tables, click Definition Only. If you want, you
can also copy the Relationships, Menus and Toolbars, and the Specs.
You will have all of the tables with the relationships, default
values, etc. without any data. All of the tables will be empty.

You can also import Forms, Queries, Modules, etc.

Happy Computing,

Hunter57
 
J

Joan Wild

Hunter57 said:
Here is an easy way to do it.

Create a new blank Database. Then click on the Menu Bar File>Get
External Data>Import. Select the Database you want to copy from.
Click the Tables Tab. Then click on the Options button on the Import
Window. Under Import Tables, click Definition Only. If you want, you
can also copy the Relationships, Menus and Toolbars, and the Specs.
You will have all of the tables with the relationships, default
values, etc. without any data. All of the tables will be empty.

You can also import Forms, Queries, Modules, etc.

That will work in this case, but not all.
 

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