How to create a web version checker (1 Viewer)

Status
Not open for further replies.

isladogs

CID VIP
Local time
Today, 11:12
Joined
Jan 14, 2017
Messages
14,016
If you distribute version updates via the Internet, you may find this useful.

Attached is an example web version checker database which shows how users can be alerted to program updates on a specified web page.

The way this works is as follows:
The code identifies if a new version is available by 'reading' all the contents of the web page to a temporary text file
It then searches the text file for a specified string where the web version number is given.

If the web version is higher than the local version, the user is alerted
The whole process takes a fraction of a second to complete

In the attached example, you can see this in action:

If a new version is available, a message similar to this will appear:



The user can then go straight to the website & download the new version

NOTE: the link will take you to my website, www.mendipdatasystems.co.uk
The latest version on the website is 5322 (as of 28/05/2017)
However, there is no point you downloading the program update listed as it requires a product licence key to install!

If the current version is the latest available, a message similar to this will be shown:



To use this code with your own databases:
1. Add the VBA reference 'Microsoft Internet Controls'
2. Import the modules modFunctions & modInternetDownload
3. Import the table tblLocalVariables or adapt the code to use similar data in another table of your own
4. The main code is contained in the procedure: CheckLatestWebVersion in modFunctions
You will need to ADAPT as necessary to suit your own database version numbering and website page contents

In my own production databases, the CheckLatestWebVersion procedure is run automatically when the program administrator logs in

Please see post #9 for an updated version of this application
 

Attachments

  • WebCheckerMessage2.png
    WebCheckerMessage2.png
    84.1 KB · Views: 1,686
  • WebVersionChecker.accdb
    588 KB · Views: 470
  • WebCheckerMessage1.png
    WebCheckerMessage1.png
    69.8 KB · Views: 1,644
Last edited:

Diplo

Registered User.
Local time
Today, 11:12
Joined
Jul 9, 2018
Messages
10
This looks like it could be very helpful! Thank you!

When you put this in you Database, if the person checking for an update has data in their DB, will they retain the data on the updated download or will you have to re-add it into the new version?
 

isladogs

CID VIP
Local time
Today, 11:12
Joined
Jan 14, 2017
Messages
14,016
This looks like it could be very helpful! Thank you!

When you put this in you Database, if the person checking for an update has data in their DB, will they retain the data on the updated download or will you have to re-add it into the new version?

This is intended for updating the front end in split databases.
As the data will all be stored in the backend, it will not be affected.

However, if you used this in an unsplit database, the data would of course be overwritten when the update was downloaded
 

CJ_London

Super Moderator
Staff member
Local time
Today, 11:12
Joined
Feb 19, 2013
Messages
12,580
presumably if you have changes to the backend this is handled as a first action when the FE is first opened?
 

isladogs

CID VIP
Local time
Today, 11:12
Joined
Jan 14, 2017
Messages
14,016
That is certainly the case in all my FE version updates.
The new FE is first relinked to the BE
Then, as required, tables may be added/deleted or table fields may be added/modified/deleted.

No such BE updating code is built into this example database however
 

Diplo

Registered User.
Local time
Today, 11:12
Joined
Jul 9, 2018
Messages
10
This is intended for updating the front end in split databases.
As the data will all be stored in the backend, it will not be affected.

However, if you used this in an unsplit database, the data would of course be overwritten when the update was downloaded

So should I split the Database and put both the FE and BE in a zipped folder then Upload it to the website? Will that allow everything to run smoothly?
 

isladogs

CID VIP
Local time
Today, 11:12
Joined
Jan 14, 2017
Messages
14,016
No.
Upload them as separate files so end users can download these separately.
You can zip them if you like but I prefer to create EXE files using a commercial installer application.

For example look at this page from my website: http://www.mendipdatasystems.co.uk/ukpaf-update/4594184431

NOTE: Don't bother downloading the program update as it requires a licence key as part of the installation

If you have any further specific questions, please start a new thread rather than reply to this moderated area
 

isladogs

CID VIP
Local time
Today, 11:12
Joined
Jan 14, 2017
Messages
14,016
I've updated the API declarations to fix a couple of errors and to simplify the conditional compilation used.
The new version has been tested in both 32-bit & 64-bit Access
 

Attachments

  • WebVersionChecker_v2.zip
    56.1 KB · Views: 86
Last edited:
Status
Not open for further replies.

Users who are viewing this thread

Top Bottom