I'm trying to modify an specific register on Access by C# but when I run the code, It doesn't modify anything, I have tried the same structure on adding resgisters or deleting and it works well, Help please
using OleDB
dataGridView1.Rows.Clear();
string sql = "UPDATE Medicos SET Id_clinica=@Id_clinica, Id_especialidad=@Id_especialidad, Nombre=@Nombre, Apellidos=@Apellidos WHERE Id_medico=@Id_medico";
OleDbConnection con = new OleDbConnection(cs);
con.Open();
OleDbCommand cmd = new OleDbCommand(sql, con);
cmd.Parameters.AddWithValue("@Id_medico", textBox1.Text);
cmd.Parameters.AddWithValue("@Id_clinica", textBox2.Text);
cmd.Parameters.AddWithValue("@Id_especialidad", textBox3.Text);
cmd.Parameters.AddWithValue("@Nombre", textBox4.Text);
cmd.Parameters.AddWithValue("@Apellidos", textBox5.Text);
cmd.ExecuteNonQuery();
con.Close();