Bonjour,
Comment faire pour récupérer le résultat d'une requete dans une variable en C#
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
SqlConnection con;
            c = new SqlConnection(connectString);
            c.Open();
            SqlDataAdapter sda = new SqlDataAdapter("Select qt from produit where ref='" + textBox1.Text + "'and nom='" + textBox2.Text + "'", c);
            DataTable dt = new DataTable();
            sda.Fill(dt);
c.Close();
merci