Home > Software engineering >  VB I've delete of database data, but there is data in the database for a great god help, new on
VB I've delete of database data, but there is data in the database for a great god help, new on

Time:09-23

 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,
  • Related