Page 1 of 1
What causes the PgSqlConnection.ConnectionLost event to fire?
Posted: Mon 31 Aug 2015 23:12
by branrigg
Specifically, I'm wondering if a failure/exception when calling PgSqlConnection.Open() will cause the PgSqlConnection.ConnectionLost event to fire. And if it does, what would be the ConnectionLostCause? (Like ConnectionLostCause.Connect or .Execute, etc).
Thanks very much for your time and help!
Re: What causes the PgSqlConnection.ConnectionLost event to fire?
Posted: Tue 01 Sep 2015 12:27
by Pinturiccio
The ConnectionLost event fires when the connection is lost. The connection must be open for this, and that's why this event never fires when opening the connection.
Re: What causes the PgSqlConnection.ConnectionLost event to fire?
Posted: Tue 01 Sep 2015 21:29
by branrigg
Ok, thanks.
What events do fire when PgSqlConnection.Open() fails (like with a "Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host." message)?
Re: What causes the PgSqlConnection.ConnectionLost event to fire?
Posted: Wed 02 Sep 2015 15:37
by Pinturiccio
The Error event fires when an error occurs while opening a connection. For more information, please refer to
https://www.devart.com/dotconnect/postg ... or_EV.html