Click here to Skip to main content
12,560,241 members (56,291 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# C#4.0
how to connect C# windows application to online sql server which is in hosting site
Posted 17-Dec-12 23:52pm
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

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

Solution 1

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

Hope will help you...

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web01 | 2.8.161026.1 | Last Updated 18 Dec 2012
Copyright © CodeProject, 1999-2016
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