j'ai un combobox contient des code, et je veux a la suite d'un code sélectionné afficher dans un label le nom correspond ce code !!
voilà mon essai:
string c = cbxCodeformation.Text;
int c = int.Parse(cf.ToString());
try
{
OleDbConnection maconnexion = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=..\\..\\gestion.mdb");
maconnexion.Open();
OleDbCommand cmd = new OleDbCommand("select intitulé from diplome where code='" + c + "';", maconnexion);
OleDbDataReader rdr = cmd.ExecuteReader();
.............................
}
catch (Exception ex)
{ MessageBox.Show(ex.Message); }
}
je suis bloquée içi.. comment je peux récupérer la valeur de la requête et met dan label
Partager