Monday, March 19, 2012

Help : "error: 40 - Could not open a connection to SQL Server"

I'm using VS2005 and SQL2000. I created a database name "myDatabase" inSQL Server 2000 and built a website that connet to this database. WhenI'm running this website in VS2005 IDE (press F5 or Ctrl-F5),everything is OK. I publiced this site. When I connect to database onmy computer, everything is OK also, but when I connect to database onanother computer, an error occurred like this :
"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) (Microsoft SQL Server, Error: 2)"
Now, I don't know how to fix it. Pls help me as soon as possible.
Regards.
By default, SQL Server 2005 doesn't have TCP/IP connectivity enabled after installation. To enable TCP/IP connectivity, go to SQL Server Configuration Manager, select the Network Configuration Node, select TCP/IP and set it to Enabled. After enabling TCP/IP connectivity, you should be able to connect.|||

I'm getting the same error but when I try to access my SQL Database on my Web Hosts server. How do I enable TCP/IP on their server if I don't have access to it?

|||Is the username, password, database name, and address of the SQL server correct?

No comments:

Post a Comment