I'm wondering how experienced database designers deal with practice
data. Once a database has been designed, built and tweaked, what does
one do with any practice data that might have been used. Do you just
go through every table and delete meaningless records? It seems like
there should be a command or process whereby a user could "reset" or
"initialize" a database - clearing all practice data, setting all
autonumber fields to start at 1, etc.
pietlinden@hotmail.com - 23 Jan 2006 16:28 GMT
easiest way is to write a macro that does something like:
1. SetWarnings False (off)
2. run all your delete queries
3. SetWarnings True (on)
Either that or import only the structure of all your tables - but then
you have to re-establish all the relationships...
David W. Fenton - 23 Jan 2006 17:47 GMT
> easiest way is to write a macro that does something like:
> 1. SetWarnings False (off)
[quoted text clipped - 4 lines]
> then
> you have to re-establish all the relationships...
Uh, not if you import the relationships.

Signature
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Allen Browne - 23 Jan 2006 16:29 GMT
Yes, essentially you delete the data from each table.
Where you have defined relations with cascading deletes, you need not worry
about the child tables. Aside from that, you start with the lowest level
related tables, and work upwards towards the categories and lookup tables,
executing a series of DELETE query statements, such as:
dbEngine(0)(0).Execute "DELETE FROM Table1;", dbFailOnError

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> I'm wondering how experienced database designers deal with practice
> data. Once a database has been designed, built and tweaked, what does
[quoted text clipped - 3 lines]
> "initialize" a database - clearing all practice data, setting all
> autonumber fields to start at 1, etc.
Peace Frog - 23 Jan 2006 17:22 GMT
>I'm wondering how experienced database designers deal with practice
>data. Once a database has been designed, built and tweaked, what does
[quoted text clipped - 3 lines]
>"initialize" a database - clearing all practice data, setting all
>autonumber fields to start at 1, etc.
Thank-you for the prompt replies...