我在程序中添加了一个button, 当用鼠标点击时会出错(abstract error), 而用回车却不会出现这样的问题,不知是什么原因?请高手批教。

解决方案 »

  1.   

    以下是我的代码,请帮我指出错误的地方?var name,spass1,spass2,str,str1:string;
    begin
    ireg:=ireg+1;
         name:=combobox1.Text ;
         sPass1:=edit1.Text ;
     //    exit;
         if table1.Locate('name',name,[]) then
            begin                //1
              sPass2 :=table1.fieldbyname('pass').asstring;
              if (sPass1=sPass2)   then
                  begin          //2
                    if (datetostr(table1.FieldByName('canceldate').asdatetime)='1899-12-31') then
                        begin    //3
                          str:=formatdatetime('yyyy-mm-dd-hh:mm:ss',Now);
                          str1:=table1.fieldbyname('use').asstring;
                          main.iuser:=table1.fieldbyname('use').asinteger;
                          table2.active:=false;
                          table2.Active :=true;
                          table2.append ;
                          table2.FieldByName('user').asstring :=str1;
                          table2.FieldByName('yh').asstring:=name;
                          table2.fieldbyname('Rq').asstring:=copy(str,1,10);
                          table2.fieldbyname('time').asstring:=copy(str,12,8);
                          if str1='1' then
                             table2.fieldbyname('yhjb').asstring:='超级用户';
                          if str1='2' then
                             table2.fieldbyname('yhjb').asstring:='高级用户';
                          if str1='3' then
                             table2.fieldbyname('yhjb').asstring:='普通用户';
                          if str1='4' then
                             table2.fieldbyname('yhjb').asstring:='一般用户';
                          table2.Post ;
                          table2.Active :=false;
                          main.calluser;
                          fcheckpass.Close;
                          fcheckpass.Free;
                        end      //3-
                    else
                        begin    //3
                          right.Caption :='对不起!你的账号已被冻结!';
                          abort;
                        end;    //3-
                  end           //2-
              else
                 begin          //2
                   if iReg>=3 then
                   begin
                      if messagedlg('对不起!您的操作将被取消!',mtconfirmation,[mbYes],0)=mrYes then
                         fcheckpass.Close;
                   end;
                   right.Caption :='登录口令错误!请重新输入!'
                 end;          //2-
            end                //1-
      

  2.   

    呵呵,我现在也还没有解决这个问题
    和我的问题一样。
    鼠标点出错,回车没错。
    我跟踪一下,发现鼠标点会触发 bottonup事件,在这里会报错。
    为此,我还专门 打补丁,upgrade2,rtl1,rtl2,还有ado的补丁,都没有用!!