Code to open odbc connection and export a table
am 06.11.2007 15:23:24 von technobob
I have a application that links to several sql tables. To improve
performance I want to have a seperate database with an autoexec macro
that when opened, connects to a ODBC data source and export three SQL
tables overwriting the previously exported tables. Once that is
completed, I want to export those tables into my working database.
I want to set up the database to run with task manager (or something
like it) to run every night.
Any suggestions or directions to where I might find some guidance?
Thanks in advance!
Bob
Re: Code to open odbc connection and export a table
am 06.11.2007 23:14:49 von Jana
On Nov 6, 7:23 am, Bob wrote:
> I have a application that links to several sql tables. To improve
> performance I want to have a seperate database with an autoexec macro
> that when opened, connects to a ODBC data source and export three SQL
> tables overwriting the previously exported tables. Once that is
> completed, I want to export those tables into my working database.
>
> I want to set up the database to run with task manager (or something
> like it) to run every night.
>
> Any suggestions or directions to where I might find some guidance?
>
> Thanks in advance!
>
> Bob
Bob:
I had a similar problem, and this post helped me:
http://groups.google.com/group/microsoft.public.access.modul esdaovba/browse_frm/thread/4af17f787901deea/7978526eb1c0e641 ?lnk=st&q=objAccess+colArgs#7978526eb1c0e641
You basically write a script and then schedule a task using the
windows task scheduler to run the script, which in turn opens your
database and runs function code modules for you. This method doesn't
require that you be logged in to the machine running it, only that the
machine be turned on. The task will log in to the computer using
whatever credentials you provided for the task.
HTH,
Let me know if you have any questions and good luck!
Jana