private void button1_Click (object sender, EventArgs e)
{
If (textBox1. Text=="" | | comboBox1. Text==" ")
MessageBox. Show (" tip: please enter!" , "warning");
The else
{
If (this.com boBox1. Text=="student id")
{
String STR=@ "Data Source=lenovo - PC \ sqlexpress; Initial catalog=users; Integrated Security=True ";
SqlConnection conn=new SqlConnection (STR);
conn.Open();
String SQL="Delete from performance information where student id='" + textBox1. Text +"' ";
SqlCommand CMD=new SqlCommand (SQL, conn);
conn.Close();
}
}
}
CodePudding user response:
Permission problem, I guess,