Combobox.Items.Clear; query.Close; Query.SQL.Text:='select distinct b from a'; try open; except .... .... end; query.first; while not query.Eof do begin combobox.Items.Add(query.fields[0].asstring); next; end;不太明白你的意思,随便写了点,不知道对不对
Combobox.Items.Clear; query.Close; Query.SQL.Text:='select distinct b from a'; try open; except .... .... end; query.first; while not query.Eof do begin combobox.Items.Add(query.fields[0].asstring); next; end;
query.Close;
Query.SQL.Text:='select distinct b from a';
try
open;
except
....
....
end;
query.first;
while not query.Eof do
begin
combobox.Items.Add(query.fields[0].asstring);
next;
end;不太明白你的意思,随便写了点,不知道对不对
query.Close;
Query.SQL.Text:='select distinct b from a';
try
open;
except
....
....
end;
query.first;
while not query.Eof do
begin
combobox.Items.Add(query.fields[0].asstring);
next;
end;