Delphi7+win2000+SQLserver,运行到某些下拉列表时出错,提示如下:
Project gycpro.exe raised exception class EAccessViolation with message'
Access violation at address 77f878BA in module 'ntdll.dll' .Write of address 004046FD'. Process stopped.Use Step or Run to Continue.
 ComboBox内的数据都是在FormActivate时加上去的,有些ComboBox正常,有些就下行,为什么?

解决方案 »

  1.   

    楼上的老兄,FormActivate时,
      with data.comm do
      begin
       Close;
       CommandText:='select * from dzsz';
       Open;
       ComboBox4.Items.Clear;
       ComboBox4.Items.Add('');
       while not eof do
       begin
        ComboBox4.Items.Add(trim(FieldByName('dzsz').AsString));
        next;
       end;
      end;
     运行时用键盘的上下键选择子项时出错,选择过程中没有事件代码。
      

  2.   

    删除ComboBox4.Items.Add('');之后就没事了,简直不可思议,前几天都没事,会是什么原因啊,大家分析一下。
      

  3.   

    ComboBox4.Items.Add('');What is the use of this sentence?
    I don't think it is necessary!
      

  4.   

    ComboBox4.Items.Add('');这话没用的,你初始化的时候写上:
    first
    ComboBox4.text:=trim(FieldByName('dzsz').AsString);