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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automatic version update..?

Status
Not open for further replies.

kenjoswe

Technical User
Sep 19, 2000
327
0
0
SE
Hi all,

I have a Access appl. with a local table containing just the version number. That version number is compared with a version number in a table on SQL-server.

When the two version numbers are different I'll display a message that there exists a newer version.

But what I really want is to automatically replace the current .mdb Access file with a copy of an updated version from a file server.

How can I do that?

/Kent J.


How can I do that?

 
Firstly you need to link your SQL server database to the access DB. eg call it SQLversion. If you already have a table called Version - all you need to do is run a query
that updates the number:

UPDATE SQLversion SQL_V, Version V
SET V.Version = [SQL_V].[Version]
WHERE V.Version < [SQL_V].[Version]

You can save this query and place code on a form that runs this automatically each time it is opened (the main form of this app would be a good place - eg. form switchboard)

Good Luck!!
 
Hallo,

The problem you will find is that you can't replace your current database as you are using it.

Write a loader program (another access application, if you like) to check both versions and do the file copy.
Once it has the latest version, open it and quit the loader.

Each user runs the loader, not the application and always gets the latest version.

You can use a 'secret' command line parameter when you run the application from the loader. If the application is run without that command line parameter then quit immediately, so that they have to use the loader.

- Frink
 
Frink,

Guess your right.

I would be a nice thing if the Access appl. could be converted into a ActivX control.

/Kent J.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top