Results 1 to 6 of 6
  1. #1
    sri123 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2014
    Posts
    12

    ODBC Communication Link Failure - Connection Lost : MS Access to SQl Server

    Hello
    I have an MS Access Application running on users desktop, which connects to Sql Server Back end.
    Users have to vpn from home to access application. The issue is when the network connection is lost, the Access is showing a bunch of crazy errors which is obvious.

    All I need is to trap these errors and let these errors show a customized message to the user.

    How and where exactly I need to trap these errors, while the user is already in the database and working on it.



    Thanks in advance..

  2. #2
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659

  3. #3
    sri123 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2014
    Posts
    12
    Where to trap such issues?? the url you have sent doesn't tell me where to call that procedure when the database is open.
    Is it on any form events? I tried to catch in On Error and Form Unload events, but didn't work

  4. #4
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    After the event occurs, you could try the function listed in the example to trap it. A button may suffice.

    Maybe in onCurrent. If nz(TestODBCErr("tblName"),"")<>"" then its broken.

  5. #5
    sri123 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2014
    Posts
    12
    Not sure, If I have put in right words.

    I want to handle the error while the application is being used by users. Say I have logged in and making in some changes on the form. At this point, a network failure occurred, this fails in communicating with sql server.
    I first see the login screen (DSN), followed by ODBC failed error - communication link failure.

    I want catch this exception and show a customized message to the user saying "some network issues occurred, now the application will close".

    I am not sure where exactly I need to handle this error...

    Thanks

  6. #6
    sri123 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Dec 2014
    Posts
    12
    Any luck, I have been trying to fix this but no success yet.
    How to avoid the DSN Sql Server login Screen, when a network connection issue occurs??

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Connection to SQL Server ODBC Failed
    By Historypaul in forum SQL Server
    Replies: 2
    Last Post: 01-05-2015, 01:50 PM
  2. Replies: 1
    Last Post: 05-17-2012, 05:51 PM
  3. Replies: 0
    Last Post: 03-08-2012, 03:12 AM
  4. ODBC link from Access to SQL Server changes to read-only
    By Petr Danes in forum Import/Export Data
    Replies: 1
    Last Post: 06-08-2011, 09:46 AM
  5. Replies: 1
    Last Post: 07-17-2010, 08:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums