摘要: 1 private void button1_Click(object sender, RoutedEventArgs e) 2 { 3 using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=master;User ID=sa;Password=123456;")) 4 { 5 conn.Open(); 6 using (SqlCommand cmd = con... 阅读全文
posted @ 2013-09-02 16:30 垂坠 阅读(1096) 评论(0) 推荐(0) 编辑
摘要: 1 private void button3_Click(object sender, RoutedEventArgs e) 2 { 3 //连接数据库字符串 4 using (SqlConnection conn = new SqlConnection("Data Source=.;Initial Catalog=master;User ID=sa;Password=123456;")) 5 { 6 //打开连接 7 con... 阅读全文
posted @ 2013-09-02 11:06 垂坠 阅读(184) 评论(0) 推荐(0) 编辑