Relinking and closing application after network disconnected issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • neelsfer
    Contributor
    • Oct 2010
    • 547

    #1

    Relinking and closing application after network disconnected issues

    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?
  • Seth Schrock
    Recognized Expert Specialist
    • Dec 2010
    • 2965

    #2
    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.

    Comment

    • NeoPa
      Recognized Expert Moderator MVP
      • Oct 2006
      • 32669

      #3
      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.

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        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.

        Comment

        Working...