连接字符串的写法

            SqlConnection cnn = new SqlConnection();
            cnn.ConnectionString = "Data Source=(local); Initial Catalog=NorthWind; integrated security =sspi;";
            cnn.Open();
            SqlCommand cmd = new SqlCommand();
            cmd.Connection = cnn;
string str = "Data Source=(local); Initial Catalog=NorthWind; User ID=zhangsan; password=123";
原文地址:https://www.cnblogs.com/Jeffli91/p/3101181.html