Check in deze regel
cmd.Parameters.Clear();
cmd.CommandText = "UPDATE contacts SET EMAIL = @EMAIL,
CELL_NO = @CELL_NO Where STUDENT_NO = @STUDENT_NO";
cmd.Parameters.AddWithValue("@EMAIL", email_txt.Text);
cmd.Parameters.AddWithValue("@CELL_NO", contact_txt.Text);
cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
Wijzig naar
cmd.Parameters.Clear();
cmd.CommandText = "UPDATE contacts SET EMAIL = @EMAIL,
CELL_NO = @CELL_NO Where STUDENT_NO = @STUDENT_NO";
cmd.Parameters.AddWithValue("@EMAIL", email_txt.Text);
cmd.Parameters.AddWithValue("@CELL_NO", contact_txt.Text);
cmd.Parameters.AddWithValue("@STUDENT_NOL",studentNo_txt.Text);
cmd.ExecuteNonQuery();
cmd.Parameters.Clear();
u wist de parameters, maar gebruik daarna @STUDENT_NO
parameter. Deze parameter wordt nergens gedeclareerd na het wissen van de parameters