MSQuery: "Connection Failed" Error Connecting to SQL Server

Last reviewed: February 2, 1998
Article ID: Q125399
The information in this article applies to:
  • Microsoft Query for Windows, version 1.0
  • Microsoft Query for Windows 95, version 2.0
  • Microsoft Query for the Macintosh, version 1.0

SYMPTOMS

When you connect to an SQL Server data source, such as Microsoft SQL Server or Sybase SQL Server, you may receive the following error message:

   Connection Failed:
   SQLState: '08001'
   SQL Server Error: -1
   [Microsoft][ODBC SQL Server Driver]Unable to connect to data


CAUSE

This error message usually indicates that the client workstation cannot find the SQL Server on the network. Possible causes for this problem include the following:

   If you are using Microsoft Query for Windows or Windows NT
   ----------------------------------------------------------

   - TCP/IP Sockets support has not been enabled on the SQL Server.

   - The client workstation has not been set up to run TCP/IP properly.

   - The SQL Server data source has not been setup with the proper TCP/IP
     address for the server.

   If you are using Microsoft Query for the Macintosh
   -------------------------------------------------

   - You may receive the error message stated above if the MacTCP Control
      Panel device has not been installed.


WORKAROUNDS

If you are using Microsoft Query for Windows or Windows NT

Method 1: Enable TCP/IP on the SQL Server (Windows NT)

To do this, follow these steps:

  1. Run the SQL Server Setup program from the SQL Server.

  2. In Options dialog box, click the Change Network Support option, and then click Continue.

  3. Make sure the TCP/IP Sockets option is selected, and then click OK.

  4. The next two dialog boxes display the Port Number and Network Address.

    You should not need to change these, but you should verify that they are correct.

  5. Return to Windows NT.

Method 2: Configure the Client Workstation for TCP/IP Connectivity

Microsoft Query for the Macintosh:

In Microsoft Query for the Macintosh, you may receive the error message described in the "Symptoms" section if the MacTCP Control Panel device has not been installed. MacTCP is distributed with Apple Macintosh System 7.5. To add the MacTCP icon to the Control Panels folder, run the Setup program for System 7.5.

For additional information, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q120254
   TITLE     : "Configuring MacTCP for ODBC Use"


Additional query words: 1.00 2.00 ODBC TCP IP connectivity
Keywords : xlquery kbenv kbnetwork
Version : WINDOWS:1.0,2.0; MACINTOSH:1.00
Platform : MACINTOSH WINDOWS


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