Mirror

How to fill a TDBListBox from a dataset (Views: 705)


Problem/Question/Abstract:

How to fill a TDBListBox from a dataset

Answer:

procedure TForm1.FormCreate(Sender: TObject);
begin
  with table1 do
  begin
    open;
    while not EOF do
    begin
      DBlistbox1.items.add(FieldByName('name').AsString);
      next;
    end;
  end;
end;

<< Back to main page