Ver Mensaje Individual
  #2  
Antiguo 14-06-2021
Avatar de MAXIUM
MAXIUM MAXIUM is offline
Miembro
 
Registrado: may 2005
Posts: 1.503
Reputación: 23
MAXIUM Va camino a la fama
Hola, creo que ya estoy dando con la solución

FDConecction cuenta con estos eventos
Código Delphi [-]
OnRecover - to respond to the connection lost event and provide the next action to FireDAC.
OnLosted - fires when a connection was lost and not recovered.
OnRestored - fires when a connection was lost and recovered.

En OnLosted detengo o activo los Timer si así lo requiero.

En OnError capturo el error o tomo las medidas necesarias.
ekServerGone: ; // DBMS is not accessible due to some reason
Código Delphi [-]
 if (AException is EFDDBEngineException) and (EFDDBEngineException(AException).Kind = ekServerGone) then
    AException.Message := 'hola';

http://docwiki.embarcadero.com/Libra...dExceptionKind

Última edición por MAXIUM fecha: 14-06-2021 a las 20:17:37.
Responder Con Cita