You are not logged in.
Pages: 1
The OnUpdateEvent at the server side will trigger after Client.Update(U);
It would be nice to add OnUpdateBlobEvent to the TSQLRestServer implementation that would be triggered after UpdateBlobFields
Client Side:
var
U: TSQLAuthUser;
FData : TSQLRawBlob;
begin
U.LogonName := 'blabla';
FData := 'Some data';
....
Client.Update(U);
Client.UpdateBlob(TSQLAuthUser, FID, 'Data', FData);
end;
Server Side:
...
WPlaceServer.OnUpdateEvent := UpdateWP;
...
function TEMServer.UpdateWP(Sender: TSQLRestServer; Event: TSQLEvent; aTable: TSQLRecordClass; aID: integer): boolean;
begin
if (Event = seUpdate) and (aTable = TSQLAuthUser) then
begin
U := TSQLAuthUser.CreateAndFillPrepare(sender, 'ID=?', [aID]);
try
U.FillOne;
sender.RetrieveBlob(TSQLAuthUser, U.ID, 'Data', FUserData);
U.Data := FUserData; // ----------------------------------------------------- at this point FUserData - contains old value
g := TSQLAuthGroup.CreateAndFillPrepare(sender, 'ID=?', [U.GroupRights.ID]);
try
g.FillOne;
UpdateUser(U, G);
finally
g.Free;
end;
finally
u.Free;
end;
end;
Offline
Feel free to create a feature request at http://synopse.info/fossil/reportlist (after anonymous login).
Please put a link to this forum thread, for reference and discussion.
Thanks.
Offline
Pages: 1