SqlCommand cmd = new SqlCommand("insert into TABLE(CHAMP 1,CHAMP2) values (@CHAMP1, @CHAMP2)",connection);
cmd.Parameters.Add("@CHAMP1",SqlDbType.Type, longueur);
cmd.Parameters.Add("@CHAMP2",SqlDbType.Type, longueur);
cmd.Parameters["@CHAMP1"].Value = valeurChamp1;
cmd.Parameters["@CHAMP2"].Value = valeurChamp2;
cmd.ExecuteNonQuery();
|