Click here to Skip to main content
16,016,882 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
Hello, this is Vikas Gohil.

I have a software created in VB.net 2005, with database as SQL server 2005 Express edition.

When this software and database are installed on same PC, it works perfectly.

But sometimes when the Database is on another PC and software is on another, it shows server or instance error and it does not connect to database.

The problem occurs mostly on windows 7 PC, on XP machines there is no problem.

Can anyone tell me what the problem could be. OR what might be the causes the Sql Server is not connecting from other PC.

My SQL Server has a User created instance and is running under Local System account. Do I need to change it to Network account for network accessibility?

Any help would be great.

Thanks.
Posted

1 solution

If you're sure about your connection string and it works fine on XP, I would suspect that Windows 7 firewall is preventing the communication. For a test, try disabling it.
 
Share this answer
 
Comments
VikashGohil 23-Mar-11 23:29pm    
hello, thanks for your reply. But i already have the firewall off. Also the pc is with database is pinging from this pc and also i can open all shared folders on that pc.
I have also tried installing management studio, but even that is not able to connect to that instance on another pc.
Wendelius 24-Mar-11 1:50am    
WHat's the exact error message you get?
VikashGohil 25-Mar-11 1:55am    
This is the exact message :
An error has occured 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 : SQL Network Interfaces, error:26 - Error locating Server/Instance Specified)
Wendelius 25-Mar-11 14:39pm    
If the firewall isn't affecting then it seems that there's something fishy in your connection string or in the client configuration. Connection string would be the first to check.

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