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

I have created a windows app with sql server as database. The app is working fine on localhost but not getting linked to server database. it shows message of Issue in sql connection.


Following is the connection string I am using in module and I have enabled TCP/IP in sql configuration manager on Server and disabled the firewall.
Pls suggest..

Public connection As New SqlConnection("Data Source=\\WIPRO-PC\SQL2012;Initial Catalog=database;User ID=sa;Password=1233456")

Here WIPRO-PC is the name of hte server which I am able to open through run and SQL2012 is the name of the instance
Posted
Comments
[no name] 9-Jun-15 7:35am    
Use the IP address.

1 solution

Also configure the server to accept connections from different computers - it may be configured to accept connections from localhost only.
 
Share this answer
 
Comments
atul sharma 5126 9-Jun-15 8:32am    
Thanks dear!
This was one of the reasons.
Others being adding of tcp: before servername instead of \\,
starting of browser service on server, And
stopping of firewall

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