Automatic Databases Link (Link Tables)

  • Thread starter Thread starter BluesPhone via AccessMonster.com
  • Start date Start date
B

BluesPhone via AccessMonster.com

I need help creating a script to automatically link 2 MYSQL databases from 2
different
servers. I have successfully connected these 2 databases manually under Get
External Data --> Link Tables, and I have run the query to get the right
result.

The question now is how can I run this query in the middle of the night with
automated links to the databases, and then run the query, export out the
result set to Excel, and then terminate the links

Your help would be greatly appreciated.

Jon
 
I' not sure what you mean by 'terminate the links'.
When you close Access/jet, the link is terminated.

To run a query automatically at night, use the windows
scheduler (or another better scheduler if you want
to run Access instead of just running queries.)

To run a number of queries, put them into a VB script
file, and schedule the script file.

To export to Excel, use a query that writes to an Excel
table.

To import from MYSQL, use a query that reads from
MYSQL.

To run a query, use a DAO or ADO object.

set object = createobject
obj.execute "select * from [database].
into [database].
"
 
Back
Top