error: 40 connecting with sql server 2000

  • Hi

    I am getting this really annoying error that I cant resolve.

    I have created a website that accesses a SQL SERVER 2000 database and it works perfectly on my home machine. The error has occurred when I have transferred it to my hosts server.

    This is the error:

     

    An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

     

    This is my connection string:

    <

    add key="ConnectionString" value="Provider=sqloledb;Data Source=hostsserver****,1433;Initial

    Catalog=db******;User Id=dbo*******;Password=********; "/>

     

    It says I am trying to connect to a SQL SERVER 2000 database as this is what I devloped the site on so I do not know why it thinks I am trying to connect to SQL SERVER 2005.

    Can anyone help?

  • which SQL server are you trying to connect to  from yuor host's web site?

    part of your connection string: Data Source=hostsserver****,1433; is not really clear since it is an example.

    you can connect via name or IP address, but the name has to be available to the web server's LAN, ie if i had a machine named WIZARD, otherwise you'd want to connect via IP address(192.168.1.? or a real external IP address)

    it sounds to me like the HOST has a sql2005 machine that is trying to answer your connection request instead of the machine you think should be answering?

    it could also mean that SQL2005 is installed and listenting on port 1433, but an additional instance may be installed of SQL2000, but listening on another port?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • You specified the default port 1433, but the error indicates the connection was attempted using Named Pipes, not TCP/IP.  If you run the server network utility (svrnetcn.exe) is TCP/IP listed as an available protocol? If so, click on Properties to make sure the port is 1433.

    What errors appear on the server? Is it set up for mixed mode?

     

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply