Solved

Version update

Posted on 2001-08-06
4
173 Views
Last Modified: 2010-05-02
How do VB programs automatically update themselves when newer versions come out?

Is there a way to do this with an Access 2000 database???

0
Comment
Question by:scorp8
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 22

Expert Comment

by:rspahitz
ID: 6357380
As far as I know, VB programs don't update themselves.  
The best you're likely to get is that their dependencies will get updated when a newer OCX or dll is installed by the user.

Since you mentioned Access, a project I'm working on will rely on the A-2000 DB for most of its updates--by design.  When we ship a new version of the DB, the customers will get the updates.
0
 
LVL 1

Author Comment

by:scorp8
ID: 6359187
I'm currently developing a db in A2K and the frontend will set locally, while the backend is on the network...  There will be version updates at least once every two to three weeks, and I don't want to go to every single persons terminal to update their copy on their local drive...  I'm working on a few things to update but not sure how it's going to work...

scorp8
0
 
LVL 8

Accepted Solution

by:
DennisBorg earned 20 total points
ID: 6359579
Scorp8:

You can write a little stub VB program which will check the time & date stamp on the local copy of file(s) which might need updating, and compare that with the time & date stamps of the network copy. If the dates on the network copies are later than the dates on the local copies, then this stub program can copy the newer files to the user's local machine. *Then* the stub program can invoke the *real* application program.

The shortcut which your users use will point to this stub program instead of directly to your real program. The stub program may or may not update certain files (depending on how the time & date stamps compare) and then it runs the real program; this makes it completely transparent to the user, and allows you to automatically update your users without having to go to each user's computer (once this is set up)

This will not work with an Access database, however, since the time & date stamp on the MDB file is updated each time it is used. For that, the stub program could check a version table in the local copy and compare with a version copy on the network to see if an update is needed.

You have to be careful, however; for if you simply copy over the database file, then the users will loose their data. So you would probably want to programmatically modify the database.

Since this seems to be a multi-user application, the database is probably on the network anyway. So your stub program probably should not be concerned with the database, just the EXE file and perhaps some associated files (such as DLL's, data files stored locally, etc) In this case, you would have to modify the database on the network while nobody is using the database, which may mean that you have to "bring the program down" (i.e. ask everyone to quit the program) for maintenance. Once you've completed your maintenance on the database, then the users can start using the program again.


-Dennis Borg
0
 
LVL 22

Expert Comment

by:rspahitz
ID: 6360068
Great idea, Dennis!

So to summarize:

Replace the Access link with a link to a Windows/VB program which:
* checks for updates
* downloads and installs those updates as necessary
* starts Access
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question