Jump to content

mainxt

Members
  • Content Count

    2
  • Joined

  • Last visited

Everything posted by mainxt

  1. Hello everyone. I want to achieve connection restoration when the connection to the SQL server is lost. I use FireDAC and PostgreSQL, Delphi 11.3 CE. And there is a good working example for this: Recovering_Connection_(FireDAC), which completely satisfied me, if not for one problem. This example works well with a regular TFDConnection, but if there is an active TFDEventAlerter in conjunction with it, then the behavior becomes completely different... when choosing AAction := faOfflineAbort or faFail, the form freezes and stops responding. If all this is configured with TFDManager and AutoConnect:=True, then after 3 connection attempts, all connections are interrupted and we have to close the program - then we get an error - FDPhysManager shutdown timeout. Possible reason: application has not released all connection interfaces. If you disable TFDEventAlerter, all problems stop. Does anyone know any standard methods for dealing with this problem? It's strange that components and methods don't work with each other as they should.
  2. Yes thank you. It really helped. I wrapped it in TTask.Run and it worked more responsively: if Assigned(FDEventAlerter.Connection) then TTask.Run( procedure begin FDEventAlerter.Connection := nil; end);
×