主从表保存数据时出错,当我删除子表数据后保存时出"Mismatch in datapacket"错,我把所有数据都显示出来,没看到有异常情况,但错误依然存在,不知道是何故,请高手们指点指点

解决方案 »

  1.   

    Problem:A mismatch in datapacket error can occur if using 
    the  ApplyUpdates method of TCustomProvider (the 
    overloaded version  that does not have the 
    OwnerData parameter.Workaround:Call the version of ApplyUpdates that has the 
    OwnerData parameter instead.
    or
    Replace this method in Provider.pas:function TCustomProvider.ApplyUpdates(Const 
    Delta: OleVariant; MaxErrors: Integer;
      out ErrorCount: Integer): OleVariant;
    var
      OwnerData: OleVariant;
    begin
      Result := ApplyUpdates(Delta, MaxErrors, 
    ErrorCount, OwnerData);
    end;
      

  2.   

    我的Delphi里面的function TCustomProvider.ApplyUpdates和你提供的这个是一样的哦,不一定是这个问题
      

  3.   

    你自己的结构定义有没有用  package record 呢?