Bonjour, est ce que quelqu'un peut m'aider, lorsque j'execute cette requete pour modifier des valeurs dans la table de ma BD il m'affiche une exception disant :
" La conversion de la chaîne "UPDATE stock SET StockMin = '" en type 'Double' n'est pas valide."

voici le code:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
Dim MyConnection As SqlConnection = New SqlConnection("Data Source=BAJBOUJ-PC;Initial Catalog=Planification;Integrated Security=True")
                Dim MyCommand As SqlCommand = MyConnection.CreateCommand
 
                MyCommand.CommandText = "UPDATE stock SET StockMin = '" + SMin + "',StockMax ='" + SMax + "' ,StockAlerte = '" + SAlr + "' where IdF = (select IdF from Franchisé where Franchisé.IdF = Stock.IdF and NomF = '" + NomFrn + "') "
                MyConnection.Open()
                MyCommand.ExecuteNonQuery()
                MyConnection.Close()
Et merci d'avance