
ADO Copy Tables from One Database to Another (Access 97)
i had to do a similar project once that only involved re-creating
tables and relationships. i used DAO to write the definitions to text
files using an INI format, then importing the definitions from the
text files into collections, and then re-creating the database objects
from the collections. if the source database is always the same and
the tables/relationships never change, you could skip writing the
definitions to text files. DAO is pretty well documented in Access --
check out the help files for examples.
Quote:
>Hello everyone,
>I'm using an Access 97 database (we'll call it main) it has about 30 tables
>in it. I need to write a VB program that will create another Access 97
>database (we'll call it destination). Once the Destination database is
>created I need the VB program to duplicate 10 of the tables from the Main
>database and put them in the Destination database. Doing so I need to insure
>that the indexes and if possible the relationships are intact in the
>Destination database. The VB program needs to be all automatic with no user
>picking which tables to move.
>Is there a way to do this through ado or dao or Vb in general?
>If so could you guide me to an good example that explains how to do this?
>Thanks you,
>David P. Leone