You are not logged in.
Hi,
Would be nice and very useful to have this method on cross.
function TSQLRest.AddOrUpdate(Value: TSQLRecord; ForceID: boolean): TID;
begin
if (self=nil) or (Value=nil) then begin
result := 0;
exit;
end;
if ForceID or (Value.fID=0) then begin
result := Add(Value,true,ForceID);
if (result<>0) or (Value.fID=0) then
exit;
end;
if Update(Value) then
result := Value.fID else
result := 0;
end;
I think the code will work as is.
Offline