Click here to Skip to main content
15,446,510 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

you may use this site as reference to create you connection string with any type of database server.

happy coding :)
Share this answer
Thomas Daniels 18-Dec-12 6:10am    
Good answer, +5!
USe IP address intead of your local server like this:
SqlConnection Con=new SqlConnection("Server=999.99.99.99; Initial Catalog= my_databse; User Id=myUsername;Password=myPassword;)
Share this answer
Hello ,

To connect hosting sql server to your machine you needed vpn connectivity or you can directly set rule in your firewall to direct connectivity between database server and application then specify IP in connection string as above mentioned.

Please let us know your feedback if any.

Thanks & Regards
Prashant .
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