如何动态查询DBComboBox中的内容,代码如下:
with DM.ADOQuery do
    begin
      Close;
      SQL.Clear;
      SQL.Add('select * from Table');
      Open;
      First;
      if not Eof then
        begin
         DBComboBox.Items.Clear;
        DBComboBox.Items.Add('');
        end;
    end;  不会写了,请高手给补下代码,

解决方案 »

  1.   

    with DM.ADOQuery do
        begin
          Close;
          SQL.Clear;
          SQL.Add('select * from Table');
          Open;
          //First;
          DBComboBox.Items.Clear;
          while  not Eof do 
            begin
             
            DBComboBox.Items.Add(fields["colunmnae"].AsString);
              Next;
            end;
        end;
      

  2.   

    DBComboBox.Items.Clear;
    Call 楼上的代码;