mohamedali1989
Messages postés80Date d'inscriptionjeudi 22 mars 2012StatutMembreDernière intervention12 mars 2013
-
29 mai 2012 à 13:20
mohamedali1989
Messages postés80Date d'inscriptionjeudi 22 mars 2012StatutMembreDernière intervention12 mars 2013
-
30 mai 2012 à 10:00
SVP je voudrait rechercher a partir d'un textbox_textchange sur datagrid,
voici ma code ,:
private void textBox1_TextChanged(object sender, EventArgs e)
{
if (textBox1.Text != "")
{
con.Open();
// charger dt
SqlCommand cmd = new SqlCommand();
cmd.CommandType = CommandType.Text;
SqlDataAdapter da1 = new SqlDataAdapter("SELECT * FROM societe FROM nom LIKE '" + textBox1.Text + "%'", con);
da1.Fill(dt_req2);
dataGridView1.DataSource = dt_req2;
DevLama
Messages postés356Date d'inscriptionmercredi 13 avril 2011StatutMembreDernière intervention18 novembre 202110 29 mai 2012 à 14:23
Dans ta Chaîne de Requête tu dois faire une concaténation en plus t'as mis le nom de la Table...
"SELECT * FROM societe FROM LAMA LIKE nom '" + textBox1.Text + "*"+"'"
La Science est Grande et Vaste partageons cette connaisance