I have the following method:
Connection c =new Connection();
SqlCommand cmd = new SqlCommand();
String empID = toolStripTextBox1.Text;
cmd.CommandText = "DELETE FROM tblEmployee WHERE employeeNumber='empID'";
cmd.Connection = c.con;
c.con.Open();
dataGridView1.CurrentCell = null;
int numberDeleted = cmd.ExecuteNonQuery();
MessageBox.Show(numberDeleted.ToString() + " employees were deleted.<br>");
c.con.Close();
I'm trying to delete a record in the table and update gridview to show the remaining records in the table. the code doesn't delete any record