#1 2015-11-24 16:57:40

Celso
Member
Registered: 2013-05-14
Posts: 55

Get error update

AB,

I have a application  client/server. On the client side, I send the data to be updated on the server. On the server side, get the information and update the database.

My question is how I can get the update error to send to the customer?


Server:
function TServiceRemoteSQL.fn_UpdateRecord(AData: RawUTF8): RawUTF8;
var
   v_sqlrc: TSQLRecord;
begin
   ....

    v_sqlrc := TSQLRecordClass(MyClass).CreateAndFillPrepare(AData);
    frmDMServer.fProps.ThreadSafeConnection.StartTransaction;
    while v_sqlrc.FillOne do
    begin
       if not frmDMServer.aServerDB.Update(v_sqlrc) then
       begin
          Result  := 'Not Update';
          v_sqlrc.Free;
          frmDMServer.fProps.ThreadSafeConnection.Rollback;
          Exit;
       end;
   end;

   ....

end;

Offline

#2 2015-11-30 22:17:51

Celso
Member
Registered: 2013-05-14
Posts: 55

Re: Get error update

some help?

Offline

#3 2015-12-01 09:35:31

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,661
Website

Re: Get error update

About error handling at interface-based service level, see the documentation.

See http://synopse.info/files/html/Synopse% … l#TITL_165

Offline

Board footer

Powered by FluxBB