What is the difference between the following
1. SqlConnection cn =
new SqlConnection("Server=(local); Initial Catalog=pubs; uid=sa; pwd= ");2. SqlConnection cn = new SqlConnection("Data Source=localhost; Integrated_Security=SSPI;Initial Catalog=pubs");
When will we use the above two in which scenario? Pls explain.
Thanx in advance
Posted Nov 3, 2008, 3:59 AM
1. Windows authentication (user id and password not required)
2. SQL server authentication (user id and password required)