Page 1 of 1


Posted: Wed 13 Apr 2016 09:05
by lepr8
There is the ability to know when there was a reconnection to the DB?
During connection set of session-level parameters that naturally are lost if there was a reconnection.



Re: Reconnect

Posted: Fri 15 Apr 2016 09:00
by azyk
dbExpress technology doesn't allow driver to inform TSQLConnection about connection loss. Therefore, in dbExpress, it is impossible to detect reconnection.

The feature that allows to control connection loss cases is present in another our product PgDAC - LocalFailover.

You can know about connection loss using the TPgConnection.OnConnectionLost event handler. Note, that the TPgConnection.OnConnectionLost event doesn't occur at the moment of loosing connection to PostgreSQL. This event occurs when PgDAC refers to the server, and the connection is already lost. To use OnConnectionLost, set the TPgConnection.Options.LocalFailover property to True. See more details in the documentation: ... ilover.htm