如何在Visual Studio 2013中连接到Windows应用商店中的sql数据库??
我可以在Windows Forms Application中连接并运行sql数据库查询,如下所示
SqlConnection conn = new SqlConnection("Data Source=JOHNDON;Initial Catalog=Register;Integrated Security=True");
SqlCommand cmd = new SqlCommand("insert into Student values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')", conn);
conn.Open();
cmd.ExecuteNonQuery();
MessageBox.Show("Submit Successfully");
conn.Close();
现在我想在Windows应用商店应用中也这样做 请帮助..谢谢
答案 0 :(得分:1)