ComboBox1.Items.Clear;
with TADOQuery.Create(Self) do
begin
ConnectionString:=ADOTable1.ConnectionString;
SQL.Add('Select Distinct 字段名 From 表名');
Active:=True;
While Not Eof do
begin
ComboBox1.Items.Add(Fields[0].AsString);
Next;
End;
Free;
end;
with TADOQuery.Create(Self) do
begin
ConnectionString:=ADOTable1.ConnectionString;
SQL.Add('Select Distinct 字段名 From 表名');
Active:=True;
While Not Eof do
begin
ComboBox1.Items.Add(Fields[0].AsString);
Next;
End;
Free;
end;
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货