Transfer data between databases

Rashers

New Member
Joined
Jul 24, 2003
Messages
31
Hi all,
Is there a quick way to transfer data from a table in one database to a table in another. I.e. transfer the results of a query to another database,

What I have is one active database called In_Process and one called Archive. The In_Process is accessed by several automated test stands and may have 30 - 40 thousand records entered on any given week. This slows down the automated process as the results become huge after time.
What I want to do is transfer all PASSED units to an archive database which would eliminate 95%+ of the records and, hence, speed up the response times of the automated stations.

I have all the required SQL queries worked out but my theoretical knowledge of Access is limited and I don't know how to append these results to the corresponding table in Archive.

Any thoughts?

Andrew
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
link the archive table to the In Process database then use An append Query to add the Passed Data To the archive follwed by a delete query to delete the same data from the original table.

HTh

Peter
 
Upvote 0
You can also do it the VB way (slower in general but sometimes what you have to do requires VB steps)

Basically, open a new workspace & DBEngine then open it precisely the same way you might open a recordset in the currently open mdb file.

Code:
Dim ws As Workspace
strDB = "pathlocation"
Set dbsArchive = DBEngine.Workspaces(0).OpenDatabase(strDB)

Set rsd = dbsArchive.OpenRecordset(strSQL, dbOpenDynaset)
 
Upvote 0

Forum statistics

Threads
1,221,618
Messages
6,160,873
Members
451,674
Latest member
TJPsmt

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top