For software testing purposes I would like to create a sterile clone (with all data blanked out) of the production database. This way I can run my unit tests on a known set of records every time. I am looking to try and do this programmatically within the unit tests themselves so I can ensure that the tables contain exactly the test data that I need for the functional tests.
I have found the following information relating to creating an Access database within C#. Note: I know Access probably isn’t the best solution, but its good enough!
What I would like to know, is there a way of using TableAdapters (perhaps) to replicate the production database schema (without any data) within a blank Access database file?
Do this:
DELETE * FROM [table]for all tables. run it several times if you have FK dependencies until there is no error – orTRUNCATE [table]as commented