title: Data too long at row 1
body: <p>im trying to update a row in my database called gestion_concour using c#</p>
  
  <pre><code>private void Modifier_Concour_Click(object sender, RoutedEventArgs e)
  {
      string input_Code = Code.Text;
      string input_Des = Des.Text;
      string input_Spe = Spe.Text;
      string selected = ConcourList.Text;
      MySqlConnectionStringBuilder builder = new MySqlConnectionStringBuilder();
      builder.Server = "127.0.0.1";
      builder.UserID = "root";
      builder.Password = "root";
      builder.Database = "gestion_concour";
      MySqlConnection connection = new MySqlConnection(builder.ToString());
      connection.Open();
      string query = "update gestion_concour.concour set Code = @N_Code, Designation = @N_Des, Specialite = @N_Spe where Code = @A_Code";
      MySqlCommand mcmd = new MySqlCommand(query, connection);
      mcmd.Parameters.AddWithValue("@A_Code", selected);
      mcmd.Parameters.AddWithValue("@N_Code", input_Code);
      mcmd.Parameters.AddWithValue("@N_Des", input_Des);
      mcmd.Parameters.AddWithValue("@N_Spe", input_Spe);
      MySqlDataReader myReader;
      try
      {
          myReader = mcmd.ExecuteReader();
          while (myReader.Read())
          {
          }
          Code.Clear();
          Des.Clear();
          Spe.Clear();
      }
      catch (Exception ex)
      {
          MessageBox.Show(ex.Message);
      }
      connection.Close();
      Fill_Combo();
      fill_grid();
  }
  </code></pre>
  
  <p>i fill the textbox so the query goes like </p>
  
  <pre><code>update gestion_concour.concour set Code = 'CAEPST', Designation = 'Concours Accées a EPST', Specialite = 'EPST' where Code = '3';
  </code></pre>
  
  <p>and i got this 
  <a href="http://i.stack.imgur.com/Mf7RC.png" rel="nofollow">Error</a>
  i tried to pass the query in woekbench and it work just fine.
  so what is the prob 
  (Code is VARCHAR(10))</p>