Access Loss of Connection to SQL Server Database

Posted on 2011-05-09
Last Modified: 2012-05-11
Our loss of connection to the SQL Server database is handled very inelegantly, the user receives an error message which keeps on reappearing until the user forces the application to shut down.  How is it possible to handle the loss of connection to the database elegantly?
Question by:Voodoo_chile
    LVL 5

    Expert Comment

    The error message indicated that the raw data that you entering into the SQL database has been disrupted, which can lead to data loss. It's a serious problem and rather than have it not error, or show the error, I woud begin looking into why it's disconnecting in the first place.
    If this happens frequently, I'd look into network latency, bad cables, network cards, bad switches, etc.

    Author Comment

    The problem is the VPN disconnected after a certain time so the Access database connection is lost. My question is how to make Access re-connected after the VPN is manually re-connected rather than the user receives an error message which keeps on reappearing until the user forces the application to shut down.

    LVL 26

    Accepted Solution

    You can't reconnect Access
    If you drop the connection, the Access app is hosed until it is shut down and re-opened.
    The errors possible are myriad, and I don't think that you can cover all the possibilities and close gracefully

    If you are to use Access in a VPN situation, the connection must be almost bulletproof.
    If it cannot be bulletproof, you are using the wrong technology, and must look to ASP/Web technologies.

    RDP and RemoteApp are possibility, but Access MUST maintain a good connection to the SQL Server at all times
    LVL 84

    Assisted Solution

    by:Scott McDaniel (Microsoft Access MVP - EE MVE )
    The only real way to manage this more elegantly is to switch to unbound forms and manage the connection to your database entirely through code. This is a massive undertaking, of course.

    Author Closing Comment

    These solutions suggest that Access (especially bounded form) is not the proper techonology using in the poor or slow network connections.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Join & Write a Comment

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
    In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
    With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…

    734 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

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now