Hello,
I’m trying to cancel changes that a user did.
But instead of doing a cancelupdates on the datatable, I want to make sure that I only cancel the current record.
So I built this code, which seams to work, but not always.
The first time I append a record, this code works, I get a RecIDValue and can use it to cancel the remove the change from the delta.
But if I directly after that append another record, the RecIDValue is always 0, so the removechange doesn’t work off course.
This is the code behind the cancel:
var
lRecNo: Integer;
lChange: TDADeltaChange;
begin
lRecNo := frm().MyDataSource.DataTable.RecIDValue;
lChange := frm().MyDataSource.DataTable.Delta.FindChange(lRecno);
frm().MyDataSource.DataTable.Delta.RemoveChange(lChange);
Can someone tell me what I’m doing wrong?
Thx
Dirk