ACC: "Communication Link Failure" Err Msg Using RAS and ODBC

Last reviewed: May 20, 1997
Article ID: Q128884
The information in this article applies to:
  • Microsoft Access versions 2.0, 7.0, 97

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, you should first make a backup copy of the registry files (System.dat and User.dat).

SYMPTOMS

Advanced: Requires expert coding, interoperability, and multiuser skills.

When you connect to a SQL Server database using Open Database Connectivity (ODBC) and Remote Access Service (RAS), you receive the following ODBC error message:

   Communication Link Failure

CAUSE

This error can occur if the following conditions are met:

  • You successfully connected to the SQL Server; for example, you opened an attached table.
  • You dropped the RAS connection and restarted it.
  • You tried to use the SQL Server, perhaps by opening the attached table again.

When you shut down a RAS connection, RAS closes the connection to the SQL Server. Microsoft Access, however, believes the connection is still open because it did not close the connection. So, Microsoft Access tries to reuse the same connection without reconnecting. This causes the error.

RESOLUTION

To work around this behavior, avoid closing the RAS connection. Also, fix any hardware problems that may be causing the RAS connection to close.

You can also set the ConnectionTimeout value in the Windows 95 registry (for Microsoft Access 7.0 and 97) or in the [ODBC] section of the MSACC20.INI (for version 2.0) to a smaller value. By default, Microsoft Access assumes it to be 600 seconds. To have Microsoft Access close the ODBC connection after 10 seconds if it is not being used, follow the steps appropriate for your version of Microsoft Access.

NOTE: By default, the ConnectionTimeout setting is not included in the MSACC20.INI file for version 2.0 or the Windows 95 registry for version 7.0.

In Microsoft Access 97

For information about how to edit the registry, view the "Changing Keys And Values" online Help topic in Registry Editor (Regedit.exe). Note that you should make a backup copy of the registry files (System.dat and User.dat) before you edit the registry.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows 95. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

  1. The ODBC settings are all written to the registary during setup. Locate the ConnectionTimeout value in HKEY_LOCAL_MACHIN\SOFTWARE\Microsoft\ Jet\3.5\Engines\ODBC.

  2. Double-Click on ConnectionTimeout, type 10 in Value data, and then click OK.

In Microsoft Access 7.0

For information about how to edit the registry, view the "Changing Keys And Values" online Help topic in Registry Editor (Regedit.exe). Note that you should make a backup copy of the registry files (System.dat and User.dat) before you edit the registry.

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall Windows 95. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

  1. Add a new key named "ODBC" (without the quotation marks) under the

    HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Access/7.0/Jet/3.0/Engines key

  2. Add the following new value to the ODBC key:

          Name: ConnectionTimeout
          Type: DWORD
          Value: 10
    

In Microsoft Access version 2.0

Add the following line to the [ODBC] section of the MSACC20.INI file:

   ConnectionTimeout=10

Because Microsoft Access initiates the disconnection with this setting, it knows to reconnect before using the connection again.

NOTE: This change to the ConnectionTimeout setting may reduce performance because Microsoft Access must create an ODBC connection more frequently over the RAS connection.

REFERENCES

For more information about creating ODBC registry settings in Microsoft Access 7.0, please see the following articles in the Microsoft Knowledge Base:

   ARTICLE-ID: Q139044
   TITLE     : ACC95: How to Add Former MSACC20.INI ODBC Section to
               Registry
 

	
	


Keywords : kberrmsg kbusage OdbcOthr
Version : 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : kbworkaround


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 20, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.