要想在combobox控件items显示库中某一字段的内容但又不能重复  程序怎么实现呢  (关键是怎么能不重复)??

解决方案 »

  1.   

    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;不太明白你的意思,随便写了点,不知道对不对
      

  2.   

    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;