Click here to Skip to main content
15,910,603 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all...

I am developing a multi-user program using VB.NET and SQL SERVER 2005 (VS 2008).

I've done almost but when I am trying to connect application to SQL SERVER, it gives an error message that "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 Interface, error : 26 - Error Locating Server/Instance Specified).

I used the following connection string :
VB
Dim conStr as String = "Data Source=192.168.1.200\SQLEXPRESS;Initial Catalog=demoDB;Integrated Security=True"


Suggest me what should I do.

Thanks.

Gagan
Posted

The error is pretty specific: check the SQL server instalation and make sure it is configured for remote connections.

Also check your SQL server instance name, and that the IP is correct - it's a LAN based IP, so it may well be dynamically assigned by your router depending on the order in which devices are powered up. Make sure you can make a connection using Visual Studio, in the Sever Explorer pane, and look at the ConnectionString property for the database in the properties pane.
 
Share this answer
 
Comments
Gagan.20 12-Feb-12 2:59am    
Thanks for your suggestion.
 
Share this answer
 
Comments
Gagan.20 12-Feb-12 2:59am    
Thanks for your suggestion.

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