bonjour,

j'ai fait ce code pour modifier une table
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
 
                    // Chaîne de connexion
                    string connectString = @"Data Source=xxx\SQLEXPRESS;Initial Catalog=hafid;Integrated Security=True";
 
                    // Objet connection
                    SqlConnection connection = new SqlConnection(connectString);
                    // Ouverture
                    connection.Open();
                    SqlCommand command = new SqlCommand("UPDATE [Table_test] SET toto,bobo VALUES(@toto,@bobo)  + WHERE (ville='" + ville_name + "');", connection);
 
                    command.Parameters.Add(new SqlParameter("@toto", SqlDbType.Decimal));
                    command.Parameters.Add(new SqlParameter("@bobo", SqlDbType.Decimal));
 
 
                    command.ExecuteNonQuery();
j'ai un message d 'erreur probleme d'une ,.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
Incorrect syntax near ','.
merci