Delta already present ERROR

Data Abstract 10.0.0.1469
Delphi Berlin

I recently installed 10.0.0.1469 and am now getting the following error from detail tables when applying updates. The detail tables are setup using the the master detail wizard on the client using automatic where. This a straight up and basic situation. The error message is:

First chance exception at $761E3DB2. Exception class EDAException with message ‘A delta called “PartNJSUEdit” is already present’. Process ProjectTestReleaseUpdates.exe (40608)

Because this has always worked and should work now, I think there may an issue with my installation of DA/RO. That said, I am not sure how to proceed. Please Help.

Hi,

can you create a simple testcase that reproduces this issue, pls?
you can send it to support@ for keeping privacy or attach it here.

TestMasterDetailForDASupport.zip (6.4 MB)

SQLite PcTrade database.

In the example I sent, the upper grid is the Orders Table, the lower grid is the Order Details table. Click the get Data button to get an Order with its details. Change the quantity in the order detail table and click the save data button.

When I do that on my installation, I get the following:

Thanks, logged as bugs://84046

pls update:

uDADataTable.pas
    procedure WriteDeltaToStream(aStreamer: TDADataStreamer; aOnlyWithSameDataAdapter: Boolean = False; aRecursive: Boolean = True); // aRecursive param was added
    procedure ReadDeltaFromStream(aStreamer: TDADataStreamer; aOnlyWithSameDataAdapter: Boolean = False; aRecursive: Boolean = True); overload; // aRecursive param was added
...
procedure TDADataTable.WriteDeltaToStream(aStreamer: TDADataStreamer; aOnlyWithSameDataAdapter: Boolean = False; aRecursive: Boolean = True); // aRecursive param was added
...
      if self.HasDelta then aStreamer.WriteDelta(Self);
      if aRecursive then begin //added
...
      end; //added
    finally
...
procedure TDADataTable.ReadDeltaFromStream(aStreamer: TDADataStreamer; aOnlyWithSameDataAdapter: Boolean = False; aRecursive: Boolean = True);// aRecursive param was added
...
    aStreamer.ReadDelta(Self);
  if aRecursive then begin //added
...
  end; //added
end;
uDARemoteDataAdapter.pas
procedure TDARemoteDataAdapter.InternalApplyUpdate_PrepareParams(
  aRequest: TDAUpdateDataRequest; aTables: array of TDADataTable);
...
      aTables[i].WriteDeltaToStream(DataStreamer, True, False); //changed
...
procedure TDARemoteDataAdapter.InternalApplyUpdate_ReadParams(
  aRequest: TDAUpdateDataRequest; aTables: array of TDADataTable);
...
          aTables[i].ReadDeltaFromStream(DataStreamer,True, False);//changed
...

bugs://84046 got closed with status fixed.

Thank you for the quick turnaround. Did you by chance check to see if the data actually saved after the fix? Either I incorrectly patched the files, or the data from the detail table does not save when saving the master. I think it should.

The error is indeed gone, so that is good.

BTW, my example program did not have the following line in the “GetData” code:

if Active then Close;

This means that if you hit the get data button after making changes and pressing the save data button, it would look like the data saved when it did not.

I just checked out the changed modules with my actual product on sql server, and the changes are indeed saving. It must have had something to due with my SqlLite configuration.

From my end, all is now good.

Thanks!

1 Like