title: Update SQL database using VB.NET
body: <p>The code throw no errors it just didn't Execute the satement </p>
  
  <pre><code>    Private Sub Update_Program(item As Programme)
      'Set Command
      SchoolTypes.Connexion.Open()
      item.Command = New SqlClient.SqlCommand("UPDATE T_Programme Set  pro_nom='@nom' , pro_nbr_unites=@nom , pro_nbr_heures=@unit WHERE pro_no ='@no'", SchoolTypes.Connexion)
  
      ''Add Parameter
      item.Command.Parameters.Add("@no", SqlDbType.VarChar, 6)
      item.Command.Parameters.Add("@nom", SqlDbType.VarChar, 50)
      item.Command.Parameters.Add("@unit", SqlDbType.Float)
      item.Command.Parameters.Add("@heures", SqlDbType.Int)
      ''''Set Values
      item.Command.Parameters("@no").Value = item.Pro_No
      item.Command.Parameters("@nom").Value = item.Pro_Nom
      item.Command.Parameters("@unit").Value = item.Pro_Nbr_Unit
      item.Command.Parameters("@heures").Value = item.Pro_Nbr_Heure
  
      Try
          If item.Command.ExecuteNonQuery() &gt; 0 Then
              MsgBox("Modifier avec Succes!")
          End If
          SchoolTypes.Connexion.Close()
      Catch ex As Exception
          err.ShowDetails(System.Reflection.MethodBase.GetCurrentMethod(), ex)
      End Try
  End Sub
  </code></pre>
  
  <p>I have tested my Command and it works on sql but not on the program...</p>
  
  <p>Here's a paste of my database 
  <a href="http://i.stack.imgur.com/VjvD1.png" rel="nofollow">Database</a></p>