Microsoft KB Archive/61846

{| = Excel: 'Unable to Establish Connection' After Initial Login =
 * width="100%"|

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 &quot;Unable to Establish Connection.&quot; Logging back into the host at this point will generally succeed.

If this behavior is occurring, the &quot;hosts.cl1&quot; 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:

  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 &quot;m&quot; 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 &quot;hosts.cl1&quot; 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 &quot;connect myvax&quot;).   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 &quot;w&quot; 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 &quot;hosts.cl1&quot; 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 &quot;connect myvax&quot;). 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 &quot;hosts.cl1&quot; file is as follows: :login: : : ::: : 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
 * }