Duplicating DB from existing DB

imsuneaik

New member
Local time
Tomorrow, 01:07
Joined
Sep 5, 2019
Messages
8
Hi everyone,
I would like to create a new fresh database (same objects, without data) from the original one. While ctrl c + ctrl v works for the objects, I realised that relationships can't be copied in this manner. Using the inbuilt import function causes all datas to be copied in as well, together with the relationships.

May I know how do I go about this issue? Thanks in advance!
 
Hi. Welcome to AWF! There are several ways you can approach this. For example, you could simply create a copy of the DB and give it a new name. Then, simply delete all the data manually, using code, or a macro. You could also give the TransferDatabase method a try.
 
Hi. Welcome to AWF! There are several ways you can approach this. For example, you could simply create a copy of the DB and give it a new name. Then, simply delete all the data manually, using code, or a macro. You could also give the TransferDatabase method a try.

Thank you for the reply. I am trying to first method, of deleting it manually. However, some of my tables are autonumbered, as a result the records will not start from 1 right?
 
Thank you for the reply. I am trying to first method, of deleting it manually. However, some of my tables are autonumbered, as a result the records will not start from 1 right?
Don't worry about it. After you have deleted all the data, do a Compact & Repair as a final clean up process, and it will also reseed all Autonumber fields to one, provided the table is empty.
 
Don't worry about it. After you have deleted all the data, do a Compact & Repair as a final clean up process, and it will also reseed all Autonumber fields to one, provided the table is empty.

Thank you. It works!
 
When you import tables from an external database, you can do so with the data or just import empty tables by selecting Definition Only in Options

attachment.php
 

Attachments

  • ImportNoData.PNG
    ImportNoData.PNG
    15.3 KB · Views: 207

Users who are viewing this thread

Back
Top Bottom