hi Evgeny,
i’m using the code below to always make sure a field gets updated regardless of the fact if this field is changed or not, cause i want it to reflect the state in which the record exist when persisting
procedure datable.forcestateforprimkey(const pk:integer)
for I := 0 to Self.Delta.Count-1 do
begin
if Self.Delta.Changes[I].ChangeType = ctUpdate then
begin
if (Self.Delta.Changes[I].OldValueByName[fld__primkey] = pk) AND
(Self.Delta.Changes[I].OldValueByName[fld__State] =
Self.Delta.Changes[I].NewValueByName[fld__State]) then
Self.Delta.Changes[I].OldValueByName[fld__State] := Null;
end;
end;
so i’m fiddling with the oldvalue of the field in question to get DA to recognise it as a a field that needs to be updated
servers side is set to upwherekeyonly off course
now can you confirm this code does what it’s meant to do?
(i have noticed some behavior in some records from about a year ago which let me believe this code didn’t do it’s job…)
so is it safe for me to assume that this will always make DA update the record or not?