What is the point of “Initial Catalog” in a SQL Server connection string?

If the user name that is in the connection string has access to more then one database you have to specify the database you want the connection string to connect to. If your user has only one database available then you are correct that it doesn’t matter. But it is good practice to put this … Read more

Connection string using Windows Authentication

Replace the username and password with Integrated Security=SSPI; So the connection string should be <connectionStrings> <add name=”NorthwindContex” connectionString=”data source=localhost; initial catalog=northwind;persist security info=True; Integrated Security=SSPI;” providerName=”System.Data.SqlClient” /> </connectionStrings>

Format of the initialization string does not conform to specification starting at index 0

Format of the initialization string does not conform to specification starting at index 0 Web.config : <connectionStrings> <add name=”TestDataConnectionString” connectionString=”Data Source=.\SQLExpress;Initial Catalog=TestData;User ID=satest;Password=satest” /> </connectionStrings> In aspx.cs Page the code must be written in the below format : SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings[“TestDataConnectionString”].ToString());

tech