JOSE ALCANTARA Posted September 15, 2022 Share Posted September 15, 2022 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? Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 15, 2022 Share Posted September 15, 2022 Hello, First of all please specify which edition and build of uniGUI are you using? And see the documentation. Quote Link to comment Share on other sites More sharing options...
JOSE ALCANTARA Posted September 15, 2022 Author Share Posted September 15, 2022 Sorry, Edicion 1.90 comp. 1555 Delphi 10.4 Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 16, 2022 Share Posted September 16, 2022 Are you using trial version? If not, please adjust your forum email address. Quote Link to comment Share on other sites More sharing options...
JOSE ALCANTARA Posted September 17, 2022 Author Share Posted September 17, 2022 Yes, I am in the process of unigui testing Quote Link to comment Share on other sites More sharing options...
Sherzod Posted September 17, 2022 Share Posted September 17, 2022 36 minutes ago, JOSE ALCANTARA said: Yes, I am in the process of unigui testing http://unigui.com/resources/online-documentation/developer-manual Quote Link to comment Share on other sites More sharing options...
Isabelle Posted September 17, 2022 Share Posted September 17, 2022 you don't need to call "StartTransaction" because there is no transaction to do, it's just a query with "Select". Only use: qClients.Close; qClients.SQL.Clear; qClients.SQL.Add('Select * from Client ' +' where inactive = 0 ' +'Order by Number'); qClients.Open; Quote Link to comment Share on other sites More sharing options...
JOSE ALCANTARA Posted September 17, 2022 Author Share Posted September 17, 2022 Thank you Isabelle, I know, it was just an example Quote Link to comment Share on other sites More sharing options...
JOSE ALCANTARA Posted September 23, 2022 Author Share Posted September 23, 2022 El 17/09/2022 a las 10:11, Sherzod dijo: http://unigui.com/resources/online-documentation/developer-manual 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.