procedure TFLogin.FormCreate(Sender: TObject);
begin
 with dmdb do
 begin
 adoqu.Active:= False;  //执行到这里出错。
 adoqu.SQL.Clear;
 adoqu.SQL.Add('select opname from opemp;');
 adoqu.Active:= True;
 if adoqu.RecordCount>0 then
 while not adoqu.Eof do
 begin
 cboxName.Items.Add(adoqu.FieldValues['opname']);
 adoqu.Next;
 end;
 end;end;

解决方案 »

  1.   

    请问出错提示是什么? 据我估计是此时数据模块窗体dmdb还没有建立, 在菜单project----options----Forms---auto create Forms中把dmdb调到flogin之前!
      

  2.   

    有没有指定Connection?
    if adoqu.Active = true then
        adoqu.Active:= False;
      

  3.   

    [email protected]
    这个mail是你的吧?
    我把修改好的给你发过去了。
      

  4.   

    to ksaiy ,信没收到啊。
      

  5.   

    把这段代码放到FromShow事件里执行就可以通过了!
      

  6.   

    今天偶的FTP用不了。
    你上QQ吧:)