CachedUpdates + OnApplyRecord

LuxCore

Member
Hello! Tell me please what do I do to run OnApplyRecord event when OracleDataSet.CachedUpdates = true?
At this time OnApplyRecord run after
Code:
procedure Tdm.odsRESURSAfterPost(DataSet: TDataSet);
begin
  OracleSession.ApplyUpdates([OracleDataSet], false|true);
end;
But I think it is wrong way. In this way the data of OracleDataSet do not apply :(

I use Delphi 7 & DOA 4.1

Thank you

 
I'm not quite sure I understand. The OnApplyRecord event handler will fire for a dataset when ApplyUpdates is called and the dataset is included. Is this not the case for you?
 
You understood me. But I thought OnApplyRecord must to fire automatically with CachedUpdates = true and inside the OnBeforePost. May by I am wrong!
Together with this there is another problem: OracleDataSet`s changes don`t apply. I will say more: when LockMode = ImCheckImmediate then after Post message "Record has been changed/deleted by another user" is outputed.
What do I do wrong?
 
The OnApplyRecord event handler is only necessary if you want to perform custom processing instead of the standard insert/update/delete processing. Perhaps you assumed that it was required for CachedUpdates? This is not the case. For standard CachedUpdates behavior you can leave the OnApplyRecord event handlers unassigned.
 
Back
Top