Auto Update Database (1 Viewer)

Jaykappy

Jaykappy
Local time
Today, 15:17
Joined
Apr 19, 2005
Messages
13
Hello - I hope that someone can lead me in the right direction or have some sample code I can use for my question.

What I am trying to accomplish is update (on a time interval) an Access Database on a server from another Access Database residing on my network. The database on the Server will be supplying data to an ASP page. Is it possible to write a macro/code in the Database residing on the server that goes out and grabs the database from the network?

Server Database:
1. On a timed interval go and copy a table from another database (network db)
2. Copy and overwrite the table into the database residing on the server, which will be accessed by the ASP page.


Thanks,

Jay
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 16:17
Joined
Feb 19, 2002
Messages
43,486
If you want to do a full file replace, you wouldn't use Access at all. You would use Windows scheduler and copy the file. Of course, the file must be closed or you won't be able to overwrite it.
 

modest

Registered User.
Local time
Today, 16:17
Joined
Jan 4, 2005
Messages
1,220
Active Directory might come into play?
 

simongallop

Registered User.
Local time
Today, 21:17
Joined
Oct 17, 2000
Messages
611
Would have done it the other way and had the script on the network db, with that db forcing the data to the server. This script can be launched through windows scheduler calling a macro within the database by using the /X switch
eg "c:\program files\microsoft office\office\msaccess.exe" k:\path\database\database.mdb /X MacroName

The macro can then call a module and run the relevant code. Without looking into it, can a query from one database append / make a table in another database? If so then would do that.

HTH
 

Jaykappy

Jaykappy
Local time
Today, 15:17
Joined
Apr 19, 2005
Messages
13
Harry,

That makes some sense, and was more what I was trying to accomplish. I am sort of new to this stuff and have a couple more questions.....
1. So in Windows Scheduler I would create a script that opens the database and runs a macro: "c:\program files\microsoft office\office\msaccess.exe" k:\path\database\database.mdb /X MacroName
2. This in turn would force a specific table into another database resulting in an update/overwrite to that database.

Do you or anyone reading this have any code examples of a macro calling a module, and or any relevant code?
 

Users who are viewing this thread

Top Bottom