I'm using VS2005 and SQL2000. I created a database name "myDatabase" in SQL Server 2000 and built a website that
connet to this database. When I'm running this website in VS2005 IDE (press F5 or Ctrl-F5), everything is OK. I publiced
this site. When I connect to database on my computer, everything is OK also, but when I connect to database on another
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.

Help : "error: 40 - Could not open a connection to SQL Server"
siva_Baskar
I have the same problem, but this didn't help for me.
Can someone pleace give me an example how the connectionstring would look like, when connection to an shared sql server on another server.
CraigInGeorgia
Me too,
After switching from Enterprise Manager to Management Studio I can no longer connect to remote databases (version 2000):
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) (.Net SqlClient Data Provider)
Update: Using MS Access 2000 I can still connect, by creating an "Access Database Project". Not really good enough, though.
Team Build
Babbage
Installed VB.net 2003 alongside VB6 and now my vb6 programs cannot connect to remote servers. I use MSDE on my own computer with enterprise manager for access to the main server and my own computer and nor can enterprise manager connect anymore to remote servers.
The only thing that has changed on my computer is the installation of VB.net 2003.
Philipp Schmid
I was having this same problem.. I was trying to connect Visual Web Developer 2005 to the SQL Server Express 2005.
My problem was:
I was connecting to <machine name> as my server... after changing it to <machine name>\SQLExpress it started working fine. Hopefully this helps.
anx
moory
I'm having exactly the same problem. Please let me know if you know how to fix the connection problem with VB2005 and SQL Express. Thanks in advanced.
DC
Amenti
The above solution worked for me as well but my problem was that I was connecting to SQL 2000 where SQL 2005 was also installed.
The connection worked until I moved from app home to work locally on my XP System. Our server only has SQL 2000 but my local machine has 2005 and 2000 running.
I suspect that there are more variations to this problem.
Pete
www.sensibleprogamming.com
West Coast of America
russc243
I'm using VB.net 2005 Express and Mysql Server Express.
I'm connecting (for now) to a sql server on my same local machine as my vb.net.
Anyone figure it out yet
papa99do
Tony Dong
James Huang
Thomas
shashankk
sandraFaust
(I had a copy on my computer from a previous problem)
Install them as normal, 2 min job, then try your connections again to remote servers.
I did this and suddenly I was able to connect to remote servers again.
vbrun60sp3 size 0.98mb is the file I used.
It is available still if you put the file name in microsoft and search.
WHAT I DONT KNOW IS IF I AM DOING ANY OTHER DAMAGE BY INSTALLING IT!
I AM NEW TO VB.NET AND DONT KNOW ENOUGH TO TELL IF I HAVE BROKEN SOMETHING ELSE BY INSTALLING IT.
Thanks.
Mick H
Same problem / error
Laptop at work no problem connecting to remote sql server
Same laptop at home could not connect to server
ISP is blocking port 1433 to prevent sql worms
Talked to ISP and they unblocked 1433,
Be persistent with them!
Use netstat -an to view open connections
TCP IP:random port IP:1433 results
before unblocking
TCP . . . :1184 . . . :1433 SYN_SENT
After unblocking
TCP . . . :1184 . . . :1433 ESTABLISHED