Click here to Skip to main content
15,885,872 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys I tried my application on my friends computer and it worked, had to change the connection string. Now I am back on my own computer the following error has occured, I have looked at general help for this error and tried the help given but it hasn't worked, any idea on what could have gone wrong, thanks in advance.


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: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
Posted
Comments
wizardzz 9-Apr-12 12:57pm    
Can you ping the server?
Tim Groven 9-Apr-12 13:02pm    
Did it work on your computer before you tried on your friends? Have you tried changing the connection string back?
Tooze 9-Apr-12 13:07pm    
Hi, yes It did work on my computer, it could connect to the database. I then opened the application on my friends, changed the string and it once again worked. When i returned on my computer the error then showed. Perhaps it was something relating to my friends computer? I did also change the string back :)
Tim Groven 9-Apr-12 13:14pm    
Have you tried changing the string back to what it was before you changed it on your friends computer?

1 solution

The above error occurs if the instance name of the SQL Server does not match the name given in the connection string.
Run the SQL Server Management Studio, check the Server name in the connect to server form and replace the server name in the connection string with this name.
 
Share this answer
 

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