title: String or binary data would be truncated VB.Net application
body: <p>I'm developping an application using <code>VB.Net</code> and this is the main form of my application :</p>
  
  <p><a href="http://i.stack.imgur.com/a4KfQ.png" rel="nofollow">http://i.stack.imgur.com/a4KfQ.png</a></p>
  
  <p>I want when I click on the button <code>Ajouter</code> to add all informations from controls into a table in my database.</p>
  
  <p>this is the table structure :</p>
  
  <pre><code>Create table Etudiant (
     num_insc varchar(20) primary key,
     CIN varchar(8),
     sexe varchar(1),
     nom_prenom varchar(30),
     date_naiss date,
     adresse varchar(150),
     Code_niveau varchar(5)
  )
  </code></pre>
  
  <p>and this is the code I tried :</p>
  
  <pre><code>Dim ds As New DataSet
  Dim row As DataRow
  Dim builder As SqlCommandBuilder
  Dim adapter As SqlDataAdapter
  
  
  
  Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
      code_niveau.Items.Add("BTS1")
      code_niveau.Items.Add("BTS2")
      adapter = New SqlDataAdapter("SELECT * FROM Etudiant", cn)
      adapter.Fill(ds, "Etudiant")
  
  End Sub
  
  Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
      row = ds.Tables("Etudiant").NewRow
      row(0) = num_insc.Text
      row(1) = CIN.Text
      If (sexe_f.Checked) Then
          row(2) = sexe_f.Name
      Else
          row(2) = sexe_m.Name
      End If
      row(3) = nom_prenom.Text
      row(4) = date_naiss.Value
      row(5) = adresse.Text
      row(6) = code_niveau.Text
      ds.Tables("Etudiant").Rows.Add(row)
      builder = New SqlCommandBuilder(adapter)
      adapter.InsertCommand = builder.GetInsertCommand
      adapter.Update(ds, "Etudiant")
  End Sub
  </code></pre>
  
  <p>But when I click on the button <code>Ajouter</code> I get this error message : </p>
  
  <blockquote>
    <p>String or binary data would be truncated.</p>
    
    <p>The statement has been terminated</p>
  </blockquote>
  
  <p>.</p>