Results 1 to 4 of 4
  1. #1
    Join Date
    Aug 2006
    Posts
    559

    Unanswered: Delete Test Data

    Anyone know of the EASIEST way to eliminate ALL test data from a database when you're done building it? Something that will set ALL PRIMARY KEYS back to 1?

    There are only like 3 tables that I don't want this to happen to though since they hold the system admin information.

  2. #2
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    1. Create a new, blank database file
    2. Goto File - Get External Data - Import
    3. Import all objects from your established database including tables that you want without the test data. When you're in the Import pane for tables, click on Options and select Import Definitions Only
    4. After everything is selected, click OK.


    Now repeat Steps 1 & 2, above, and when you get to Step 3, only import the three tables that you want to include with their data.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  3. #3
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    why the need to reset back to one.....
    you cannot and should not attempt to apply any meaning to a autogenerated number outside the system. specifically iut should not be used for things like order numbers, invoice numbers where accoutants demand special meaning out of the number/ where if they see gaps or numbers out of sequence they get upset.

    if its just your own self imposed request, then fine. do it.

    its no bad thing to have a test data and a live data so following Missingling's steps will give you a new clean database.
    I'd rather be riding on the Tiger 800 or the Norton

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    In line with what healdem said about the use of Autonumbers, John Vinson, I think it was, said it best:

    Autonumbers are unfit for human consumption!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •