This is the code i wrote but it's not changing any data in the database even after a successful messageBox
connection.Open();
command = new OleDbCommand("UPDATE employeeTable SET fullname=@fullname, [gender]=@gender, [dept]=@dept, [sector]=@sector, [sub_sector]=@sub_sector, [timetable]=@timetable WHERE empid=@empid", connection);
command.Parameters.AddWithValue("@empid", txtEmpID.Text);
command.Parameters.AddWithValue("@fullname", txtName.Text);
command.Parameters.AddWithValue("@gender", cboGender.SelectedItem.ToString());
command.Parameters.AddWithValue("@dept", cboCompany.SelectedItem.ToString());
command.Parameters.AddWithValue("@sector", cboSector.SelectedItem.ToString());
command.Parameters.AddWithValue("@sub_sector", cboSub.SelectedItem.ToString());
command.Parameters.AddWithValue("@timetable", cboTimetable.SelectedItem.ToString());
command.ExecuteNonQuery();
connection.Close();
MessageBox.Show("Record Updated Successfully!", "NEW EMPLOYEE ADDED", MessageBoxButtons.OKCancel, MessageBoxIcon.Information);