呵呵,我怎么觉得好象我从数据库里查询加入的数量不仅仅那么少?

解决方案 »

  1.   

    CountItems是TStrings类的,那一定有一个Count属性吧
      

  2.   

    TO 楼上:combobox中最多有多少个item? 
    呵呵,我怎么觉得好象我从数据库里查询加入的数量不仅仅那么少?
    ------------
    上面是楼主的描述。应该就是要一个Integer吧,不会是要浮点。
      

  3.   

    procedure TFrmWzrk.ComboBox1DropDown(Sender: TObject);
    var GetDropDownQuery: Tadoquery;
      querystr: string;
    begin
      combobox1.Items.Clear;
      querystr := combobox1.Text;
      GetDropDownQuery := Bussiness.ReturnDQuery('select gh_mc,gh_id from gh_table '
        + ' where gh_mc like ''%' + querystr + '%'' or gh_py like ''%' + querystr + '%''', self);
      with getdropdownquery do
      begin
        while not eof do
        begin
          combobox1.Items.Add(fieldbyname('gh_mc').AsString);//增加!~
          combobox1.Values.Add(fieldbyname('gh_id').AsString);
          next;//继续查符合标准
        end;
      end;
    end;
    那是相当的多了!~应该可以满足你的需要!~
      

  4.   

    #define MaxInt (int)(2147483647)MaxListSize = Maxint div 16;
      

  5.   

    procedure TFrmWzrk.ComboBox1DropDown(Sender: TObject);
    var GetDropDownQuery: Tadoquery;
      querystr: string;
    begin
      combobox1.Items.Clear;
      querystr := combobox1.Text;
      GetDropDownQuery := Bussiness.ReturnDQuery('select gh_mc,gh_id from gh_table '
        + ' where gh_mc like ''%' + querystr + '%'' or gh_py like ''%' + querystr + '%''', self);
      with getdropdownquery do
      begin
        while not eof do
        begin
          combobox1.Items.Add(fieldbyname('gh_mc').AsString);//增加!~
          combobox1.Values.Add(fieldbyname('gh_id').AsString);
        end;
      end;
    end;
     
     
    正解
      

  6.   

    俺是问大家,超过多少个以后combobox1就显示不了了.
      

  7.   

    至少同意hongqi162(失踪的月亮)所说:Combobox的Items.Count最大可以是MaxInt(即2147483647)。因为TStrings.Items.Count是Integer类型的。估计在应用中一般很难突破这个数字吧。