Reconnect

Reconnect

Postby lepr8 » Wed 13 Apr 2016 09:05

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.

Thanks.

Regards
lepr8
 
Posts: 4
Joined: Tue 29 Jan 2013 10:41

Re: Reconnect

Postby azyk » Fri 15 Apr 2016 09:00

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: https://www.devart.com/pgdac/docs/?devart.dac.tdaconnectionoptions.localfailover.htm
azyk
Devart Team
 
Posts: 961
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A


Return to dbExpress driver for PostgreSQL