Click here to Skip to main content
11,434,799 members (47,887 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#4.0
how to connect C# windows application to online sql server which is in hosting site
Posted 18-Dec-12 0:52am
Comments
Avinash_Pathak at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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...
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.150428.2 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100