Excel: 'Unable to Establish Connection' After Initial Login

Last reviewed: November 2, 1994
Article ID: Q61846
The information in this article applies to:
  • Microsoft Excel for the Macintosh, versions 2.2 and 3.0

SUMMARY

If Continuous Connection is deselected when setting an external database, or Close Connection is selected, the Data Access macro will disconnect from the host computer but leave the external database commands available. Selecting one of these commands logs back into the host to execute the command.

If the host computer is slow in disconnecting, selecting a menu command immediately after selecting Close Connection or immediately after Microsoft Excel has automatically closed the connection may result in the error message "Unable to Establish Connection." Logging back into the host at this point will generally succeed.

If this behavior is occurring, the "hosts.cl1" file can be modified to cause Microsoft Excel to wait until the host is ready before attempting to login.

MORE INFORMATION

Delaying login until the host computer is ready can be done one of two ways:

  1. If the network has a prompt, [such as a greater than (>) sign] Excel can be instructed to wait until it receives the prompt by entering a backslash followed by the letter "m" and the prompt. For example, to tell Excel to wait until it receives a greater-than prompt, enter \m>.

    A typical start sequence in a "hosts.cl1" file might be \r\m>\sconnect myvax. In this sequence, \r sends a return character, \m> waits for a greater-than sign (up to the amount of time specified by connect2), and \s sends the text following it to the network (that is, the text "connect myvax").

  2. If the network does not have a prompt, or if the prompt is unknown, instruct Microsoft Excel to wait a specified amount of time before logging into the host computer. To do this, enter a backslash followed by the letter "w" and a number to indicate how many seconds to wait. For example, \w5 will cause Microsoft Excel to wait five seconds after receiving the instruction to login before actually sending the login sequence.

    A typical start sequence in a "hosts.cl1" file might be \r\w5\sconnect myvax. In this sequence, \r sends a return character, \w5 waits for five seconds, and \s sends the text following it to the network (that is, the text "connect myvax"). Note that this method causes a delay of the specified amount before any attempt is made to connect to the host computer, even if the host computer is ready sooner than that. For this reason, the first method is preferred.

The general format for the login information in the "hosts.cl1" file is as follows:

   <Connection Name>:login:<login attempts>:<logout sequence>:
   <Connect Delay 1>:<Connect Delay 2>:<Recovery sequence>:
   <Start Sequence>:<Connect Sequence>

For more information on the configuration information, query on the following words:

   hosts.cl1 and configuration and login

For more information on connecting to the host, query on the following words:

   close and connect and continuous and disconnect


KBCategory: kbother
KBSubcategory:

Additional reference words: 2.2 2.20 3.0 3.00 paste fieldnames SQL
sequel extract mainframe CL1 DAL DAM

KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


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: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.