ACC: "Communication Link Failure" Err Msg Using RAS and ODBC
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.
- 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.
- 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.
- Add a new key named ODBC under the
HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Access/7.0/Jet/3.0/Engines key
- 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:
Q139044 ACC95: How to Add Former MSACC20.INI ODBC Section to
Registry
Keywords : kberrmsg kbusage OdbcOthr
Version : 2.0 7.0 97
Platform : WINDOWS
Issue type : kbprb
Last Reviewed: April 9, 1999