Re: import tables

From: Alan Davis <algie_at_tcp.co.uk>
Date: 1996/12/10
Message-ID: <32adea8c.11145602_at_news.tcp.co.uk>#1/1


emetrics_at_ix.netcom.com wrote:

>I have programmed in access for over as year now and am now diving into vb4.
>I use ACCESS2.0 and VB4.
>Currently I am writting an app that allows me to select an mdb, list all tables in mdb and then
>create another mdb with only those tables that user selects (i do this to save mdbs and table
>structures for my reference) Later on I will try this with queries. If I were using access I
>could import the desired table into my mdb copy only table structure (no data) and then kill
>imported table. but I cannot find a way to do this in VB. I have looked to attach method but
>this implies to me that the original table is still linked.
>
>RECAP
>Given MDB1 with tables 1 to N
>import selected tables (no data) into MDB2 with same table names.
>
>Any help is greatly appreciated

Hello,

You could use a Make Table SQL query, but as this does not 'copy' Relationships, Indexes, Field attributes etc, I do not think this is what you want.

So you need to use DAO objects to create and 'copy' the table, table fields etc to the new database.

Have a look at the Tabledefs, Fields, Indexes and Relationship collections in the help files.

         Alan Davis, Southampton, England Received on Tue Dec 10 1996 - 00:00:00 CET

Original text of this message