The common declarations in the connection string are:
The server declares Data Source, server, and addr.
Database declarations Initial catalog and databases.
Security statements for Integrated Windows accounts integrated and Trusted_Connection.
Use database account security to declare user IDs and password, and so on.
For access to the database account, usually we see in some resources ado.net string concatenation is often the following:
String connstr = "Server = localhost; User ID = sa; Password = XXX; Database = Northwind ";
For an account that integrates Windows security, the connection string is typically written as follows:
String connstr = "Server = localhost; Integrated Security = SSPI; Database = Northwind ";
or string connstr = "Server = localhost; Trusted_Connection = yes; Database = Northwind ";
Using Windows Integrated Security authentication has many advantages in accessing the database: Higher security, faster access, less work to redesign the security architecture, hard coding of connection strings, etc., and is worth using.
Http://maxianghui.cnblogs.com/archive/2006/07/11/448228.html