摘要:
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... 阅读全文
摘要:
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... 阅读全文