Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to connect C# windows application to online sql server which is in hosting site
Posted
Comments
Avinash_Pathak 18-Dec-12 6:14am    
that online sql server must have servername (ip address) and the database you want to connect must have username and password so take it from there and put it your web.config file in your connectionstring...and you done it...

1 solution

Try Connection String Like following
connectionString="Data Source=127.0.0.1;Initial Catalog=DatabaseName;User ID=sa;Password=PWD@123" providerName="System.Data.SqlClient"


Hope will help you...
 
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