By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,662 Members | 1,790 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,662 IT Pros & Developers. It's quick & easy.

Relinking and closing application after network disconnected issues

100+
P: 547
We get lots of power/electricity failures or dips here in dark Africa UPS's are not available everywhere.
I find that my front-ends applications do not always enjoy this challenge.

I suppose one somehow has to relink to the backend, but when somebody is stuck in a combobox etc, they sometimes struggle to exit and close my app.

Any suggestion on how to deal with this best?
Maybe a "forced close button" and then relink?
Nov 5 '13 #1
Share this Question
Share on Google+
3 Replies


Seth Schrock
Expert 2.5K+
P: 2,931
Try reading the following thread: Relinking ODBC Tables using VBA. I know that the title says ODBC, but the second post (by Neopa) also tells how to relink to Access tables. Having never experienced what happens when the link goes down while in the middle of modifying a record, I'm not sure how locked down Access becomes, but possibly a timer that checks for the connection every 10 minutes and if the link is broken you can use the code in the link above to attempt to relink the database without having to exit the program.

This is just an idea. I haven't tried anything remotely close to this before, but it may at least get you started.
Nov 6 '13 #2

NeoPa
Expert Mod 15k+
P: 31,271
Interesting trigger question. I wonder if I need to handle this in my DB too.

I have recently got into the habit (Not from network outages but from crashes where the users just try to carry on as if nothing's happened.) of coding my forms such that any procedure which is triggered by user actions starts by calling a procedure that checks for the project still being alive. I do this by testing a Public variable that is always set when the project is alive. If you were to do something similar, you could include the code to relink your tables (In your case simply call the linked tables' .RefreshLink() method.) when it is determined that they have become unavailable.
Nov 6 '13 #3

Rabbit
Expert Mod 10K+
P: 12,324
You can use WMI to monitor the status of a network share. More info can be found in our WMI tutorial: http://bytes.com/topic/access/insigh...n-wmi-tutorial.
Nov 6 '13 #4

Post your reply

Sign in to post your reply or Sign up for a free account.