J'utilise une connexion ADO qui affiche mes résultats dans une listbox. Je voudrais faire la meme chose avec DBLookup !
Merci
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 procedure TForm1.FormShow(Sender: TObject); begin LabelPseudo.Caption:=pseudo; DM.ADOQuery1.Close; DM.ADOQuery1.SQL.Clear; DM.ADOQuery1.SQL.Add('SELECT NumCompte FROM Comptes WHERE Pseudo="'+Pseudo+'"'); DM.ADOQuery1.Open; while not DM.ADOQuery1.Eof do begin DBLookupComboBox1.listfield:= ??? ListBox1.Items.Add(DM.ADOQuery1.Fields[0].AsString); DM.ADOQuery1.Next; end; DM.ADOQuery1.Close; end;
Partager