C# .NET - connection string - Asked By sachin on 12-Nov-14 10:08 AM

what are the different conection string syntax for
-> SQL SERVER management studio 2008
-> SQL server of asp.net (which is inbuilt)
Robbe Morris replied to sachin on 12-Nov-14 10:14 AM
There is no such thing as a connection string to Management Studio.  In both environments, you are connecting to a sql server instance.  Management Studio is just a front end user interface client to that instance.

It all depends on the programming language/platform you are using to connect to that instance.  Typically known as data providers.  You have native (.NET provider for sql server), oledb, odbc, and some providers for Java and PHP.  All have slightly different connection string syntax.
sachin replied to Robbe Morris on 12-Nov-14 10:26 AM
i mean some use
connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True" providerName="System.Data.SqlClient"/
 and sometimes

Data Source=.\SQLEXPRESS;Initial Catalog=online_book_shope;Integrated Security=True"
I just wanted to know when to use which
najna abdulla replied to sachin on 27-Nov-14 12:02 AM
 <add name="CareerSQLConnectionstringHome" connectionString="Data Source=localhost;Initial Catalog=LiventusIntranet;User ID=MyDb;Password=P@ssw0rd" providerName="System.Data.SqlClient" />