Einzelnen Beitrag anzeigen

Benutzerbild von Jens Schumann
Jens Schumann

Registriert seit: 27. Apr 2003
Ort: Bad Honnef
1.644 Beiträge
 
Delphi 2009 Professional
 
#3

Re: ComboBox mit Daten einer SQL-Abfrage füllen

  Alt 17. Mai 2004, 14:25
Hallo,
wie wäre es damit:
Delphi-Quellcode:
With Query1 do begin
     Active := False;
     SQL.Add('Select Aus_Name As Name, Aus_Datum As Datum');
     SQL.Add('From Tabelle1');
     SQL.Add('Where Aus_Name = "Max"');
     SQL.Add('Group By Aus_Name, Aus_Datum');
     Open;
     While Not EOF do
       begin
       ComboBox1.Items.Add(FieldByName('Datum').As String); //Hier liegt das Problem
       Next;
       end;
     Active := False;
end;
I come from outer space to save the human race
  Mit Zitat antworten Zitat