change fields in OnApplyUpdates => 'Record has been changed'

icegood

Member²
Tried to implement next architecture:
1) Generate fake id's on AfterInsert statement
MyDS.FieldByName('MY_ID').AsInteger := nFakeID;
2) Change them to real ones on OnApplyUpdates:
MyDS.FieldByName('MY_ID').AsInteger := nRealID;
Applied => FALSE to let DOA do rest of the work
=>
Record successfully saved

Now after ApplyUpdates and CommitUpdates and after trying to edit new inserterd record i've obtained :
'Record has been changed' on that field 'MY_ID'

How to overcome it?

Delphi XE3+DOA 4.1
 
Back
Top