Reputation: 11003
I created a local MSSQL database with my ASP.NET project.
Now I want to connect to my database hosted in www.abc.com
What should I put in the connectionString ?
Upvotes: 0
Views: 6924
Reputation: 2399
"Data Source=Your_Server_Name;Initial Catalog= Your_Database_Name;UserId=Your_Username;Password=Your_Password;"
or
"Data Source=Your_Server_Name;Initial Catalog= Your_Database_Name;integrated security=true"
Upvotes: 0
Reputation: 94653
You may use Server Explorer
tool of Visual studio to get the connection string. (Right click on Data Connections + Add Connection).
Upvotes: 0
Reputation: 103388
Check with your hosting provider (abc.com). Some hosting providers don't allow remote connection to their databases, and require you to use their web application to access your database.
If they do allow access, they should provide you with SQL Authentication details of:
An example of a SQL connection string would be:
Data Source={server name/ip};Initial Catalog={database name};User ID={username};password={password}; MultipleActiveResultSets=True;
Upvotes: 1