Reputation: 9850
I have a SQL Server database located at http://192.168.10.3/MyDB
. I have created a C# MVC application, and I need to know the steps to connect my application to the above database.
Is it only replacing the connection string in the web.config
file ?
Data Source=?? ;Initial Catalog=??;Integrated Security=SSPI;
User ID=??;Password=pwd;
If so what am I to replace where I have placed the ??
sign ?
Upvotes: 4
Views: 10521
Reputation: 1047
Below is connection string you need for:
Data Source="192.168.10.3" ;Initial Catalog=MyDb;Integrated Security=SSPI; User ID=sa (for example);Password=whatever you set before;
Upvotes: 0
Reputation: 2258
The other answers here are good. In addition, ConnectionStrings.com can be your friend, especially if you are going to connect to various types of databases in the future. Select the database that you need to connect to and then you'll see the different connection strings you can use for that database.
http://connectionstrings.com/sql-server-2012#sqlconnection
Upvotes: 3
Reputation: 2878
you can try this
Upvotes: 1
Reputation: 5009
Upvotes: 5