Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy a Linked table w/New Name to an External DB

Status
Not open for further replies.

Sorrells

Programmer
Dec 28, 2000
92
US
I would like to copy about 6 tables in a Program_db with client data into new tables in a Data_db where the new table has the same name but with a Client_Prefix (eg sd_). My hope is to create the table on the fly in memory and not add to the size of the Program_db during the operation. The original tables are linked from the Data_db.

I ran across the CopyOject Action that performs the task with one exception, the copied table in the data_db is linked to the Program_db. In the help topics there is no mention that the tables are linked nor do I see a way to break the link so that the table is whole in the Data_db.

Obviously there are many ways around this but I surely would appreciate advice on the most efficient one. The following possibilities come to mind:

1) Add a field to each of the client sensitive tables to hold a 'Client Index Number' that can be related to the Client_Prefix [I like this but will have to perform some retrofitting]

2) Create the table structures from scratch in the Data_db then copy the data into them. [Assuming that I can create a table in an external DB, seems possible. Reluctant to code all the fields to be entered.]

3) Break the shackle links from the new tables in the external dB. [I bet this cannot be done]

4) Move the linked tables to the Program_dB If I did, I know by experimentation that the new tables in the Data_db are not linked. [I hate to do this as it will require more compaction on the open DB. I have already discovered that in Access97, this is not an easy matter either.]

4) Any others????

I'd appreciate any advice. If the above set is all there is, I'd go with number 1 if there were not any more input. So perhaps someone might save me from myself?!?
Regards, Sorrells
 
Have you considered using a Make Table query? You can create it in the QBE pane or in SQL and specify that the output (New Table) be in a database other than the current database. It would create a new table with a copy of the data and would also allow you to specify the new table name.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top