连接字符串的写法

            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";

 

 

posted @ 2013-05-27 11:01  夜明猪  阅读(226)  评论(0编辑  收藏  举报

现在就做 遇见更好的自己