con.Open();
cmd = new OleDbCommand("UPDATE staff SET StaffNr = @a, FirstName = @b,
Surname = @c, Email = @d, Balance = @e WHERE Email = @d", con);
cmd.Parameters.AddWithValue("@b", textBoxStaffName.Text);
cmd.Parameters.AddWithValue("@c", textBoxStaffSur.Text);
cmd.Parameters.AddWithValue("@d", textBoxStaffE.Text);
cmd.Parameters.AddWithValue("@e", double.Parse(textBoxSatffBal.Text));
cmd.Parameters.AddWithValue("@a", int.Parse(textBoxStaffNr.Text));
cmd.ExecuteNonQuery();
con.Close();
由于某种原因没有更新数据库,但代码运行