Jump to content

StartTransaction


JOSE ALCANTARA

Recommended Posts

 

Greetings guys, When I use the StartTransaction and an error occurs, the message is given to me on the server side Example:

  uniMainModule.FDCon.StartTransaction;
  Try
     qClientes.SQL.Clear;
     qClientes.SQL.Add('Select * from Cliente '
     +' where inactivo = 0 '
     +' Order by Nombre');
     qClientes.Open;

    uniMainModule.FDCon.Commit

  except
     on E:Exception do
     begin
        UniMainModule.FDCon.Rollback;
        Application.MessageBox( PChar( E.Message ), 'Error', MB_ICONSTOP );
     end;
  end;

 

In this example cause an error the table is called Clientes, the error is displayed on the server side.

 

what am I doing wrong?

 

Link to comment
Share on other sites

El 17/09/2022 a las 10:11, Sherzod dijo:

Greetings Sherzod,

It's not that the code I have doesn't work, it does the Rollback and commit perfectly, the only problem is that when an exception arises the message is given on the server side, if that happens to a user, it simply hangs app and you won't know what's going on

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...