Click here to Skip to main content
15,893,644 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
SQL
I am developing a program in VS.2010 combining visual basic project with a DLL from c #.  the problem is that my PC works fine but when I run it on another pc I get the following error.

A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)




I gave change the server name in the connection string for the name of the machine on which I want to run it.

however always happens the same error. verique and sql and all services are running well
Posted

 
Share this answer
 
v2
Comments
idoug12 13-Feb-14 8:11am    
I have followed each of their tips and have checked all, but it seems that the project for some reason keeps bringing me the name of the server where the application develops. it could be? help me
Thomas Daniels 13-Feb-14 11:43am    
What do you mean exactly?
idoug12 13-Feb-14 11:45am    
I developing a application in visual studio 2010 with a base in sql server 2008 r2. on PC where I am developing functioning properly but I tried it on another machine and I did not connect to the database.

already changed the connection string
Data Source = (local); Initial Catalog = "database"; Integrated Security = True // and still can not connect. help me
Thomas Daniels 13-Feb-14 11:49am    
Do you also have SQL Server installed on the other machine?
idoug12 13-Feb-14 11:55am    
yes.
Check on connection string and/or User role un other machine's database where ur program is running. . .

error: 40 - Could not open a connection to SQL Server is something to do with the connection of program's dedicated server
hope it will help. . .
 
Share this answer
 
Comments
idoug12 13-Feb-14 8:11am    
I have followed each of their tips and have checked all, but it seems that the project for some reason keeps bringing me the name of the server where the application develops. it could be? help me

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900