! How to duplicate database structure 
Author Message
 ! How to duplicate database structure

Hi All,

What is the best way to duplicate the structure of an mdb file in VB5 using
DAO? I want to create a new, empty mdb that has the same structure as an
existing mdb. Users will be invoking this code via a menu command.

I'm thinking of making a partial replica and then clearing the ReplicaId
property. Would that work?

Thanks,
Matt



Sat, 01 Jul 2000 03:00:00 GMT  
 ! How to duplicate database structure

Hello Matt,

Why not simply copy the MDB file, and then run delete queries against each
table in the TableDefs collection.

The code to duplicate a table in DAO including all indexes and properties is
extensive and ugly.  Your partial replica solution sounds good, but the file
copy is much easier to implement.  It would require more disk space then the
replica method though, depending on the size of the database.

I hope this helps,

Larry R. Tubbs Jr., MCPS, MCSD
Silverleaf Resorts Inc, NYSE: SVR

Quote:

>Hi All,

>What is the best way to duplicate the structure of an mdb file in VB5 using
>DAO? I want to create a new, empty mdb that has the same structure as an
>existing mdb. Users will be invoking this code via a menu command.

>I'm thinking of making a partial replica and then clearing the ReplicaId
>property. Would that work?

>Thanks,
>Matt



Sun, 02 Jul 2000 03:00:00 GMT  
 ! How to duplicate database structure

Quote:
>Why not simply copy the MDB file...

> Your partial replica solution sounds good, but the file
>copy is much easier to implement.  It would require more disk space then the
>replica method though, depending on the size of the database.

Copying the mdb is much easier and everything in it will duplicate exactly as
is.  As for it being larger, I would open it up after duping and delete all the
data from the tables, then close the mdb and use the Database Tools/Compact and
that will recover some of the space.  Good luck.

Bob

Profanity is the one language all programmers know!



Mon, 03 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Duplicating a form structure

2. Code to duplicate a table structure using VBA

3. Need Fast Algorithm To Duplicate Tree Structure

4. I am getting duplicate records, I mean everything is duplicate even Access record number

5. Holy holy duplicates duplicates Batman Batman!

6. Dispatch Database Duplicate Fields

7. Database Duplicates -- Your Ideas and Methods

8. Database - duplicate records

9. VB error trapping of duplicates in indexed Access database

10. HELP: Duplicate Keys in Access Database

11. How do I exclude duplicate database records

12. How2 DUPLICATE a database?

 

 
Powered by phpBB® Forum Software