ODBC fail to connect error (1 Viewer)

ellenr

Registered User.
Local time
Today, 12:12
Joined
Apr 15, 2011
Messages
397
My db's be is an odbc mysql db. I have added a login password to the program and wish to force users to download the new version from our ftp site. The autoexec macro calls a vba openprog module, in which the odbc connection string is set up and then opened with the following:
Code:
Set MyODBCdb = DBEngine(0).OpenDatabase(strdatabase, dbDriverNoPrompt, True, MyConnectionString)
My idea is to change the odbc password (encoded in the MyConnectionString), triggering a connection error causing control to be sent to:
Code:
Err_openprog:
    DoCmd.OpenForm "reloadpopupforce"
    Resume Exit_openprog
Infortunately before it goes to the Err_openprog it opens up the MySQL connector/ODBC data source configuration form, in which the user must click OK 3 times and then agree to close all macros before it ever sees my popup message--very inelegant. Is there a way to keep all of that from popping up but instead going straight to the err processing that pops up the reload message? Or is there a better way to force a user with an older program to reload so they can't get into the program without entering the proper password?
 

bastanu

AWF VIP
Local time
Today, 09:12
Joined
Apr 13, 2010
Messages
1,401
I assume your front-end is Access and all users have their on on their local drive. Are they on the same network (LAN)? How do they get the new "program" aka front-end? There are many ways to deploy a new front-end, using VB scripts or Access itself. For an example of the last please feel free to use my free utility http://forestbyte.com/ms-access-utilities/fba-db-launcher/
Cheers,
Vlad
 

ellenr

Registered User.
Local time
Today, 12:12
Joined
Apr 15, 2011
Messages
397
Vlad, your deployment solution is nice, but in this instance it isn't the answer. My solution has been to open a large popup upon opening, which notifies the user that a newer version is available to be downloaded from our ftp site (which they can manage, since that is the way they got the thing in the first place). As easy as that is, some still just close the warning screen and continue to use the old version. I need a way to force them into using the new version. I can do that in future versions, by putting in code comparing version # and shutting down if a force is needed, but the original versions that are out there now do not have that coding. By changing the password to the tables, I can force them to download the newer version, but the warning popup message is behind the mysql error screens.
 

bastanu

AWF VIP
Local time
Today, 09:12
Joined
Apr 13, 2010
Messages
1,401
How about instead of changing the password for the existing connection (user) you demote its access to read only and create a new MySQL user with full access for the new front-end. That way you would protect your data integrity and your users 'get the message" that they need to upgrade.

Cheers,
Vlad
 

Users who are viewing this thread

Top Bottom