ma giusto per curiosità..
Sapendo che DSAziende2 è un datasource, TListaAziende è una TTable..
cosa c'è di sbagliato in questo codice?
codice:
QAziende.SQL.Add('SELECT * FROM aziende ORDER BY nome');
QAziende.Active := true;
QAziende.Open;
DSAziende2.DataSet := QAziende;
TListaAziende.Active := true;
TListaAziende.DataSource := DSAziende2;
while not TListaAziende.Eof do
begin
Dato := TListaAziende.FieldByName('nome').AsString;
Dati.Add(Dato);
TListaAziende.Next;
end;
LBAziende.Items := Dati;
end;