It's work well. Unfortunally the server is automatically reboot each sunday at 3:00 am.
How can I detect the connection lost ?
You detect it because I have exceptions :
Exception thrown: 'Devart.Common.k' in Devart.Data.PostgreSql.dll
Exception thrown: 'Devart.Data.PostgreSql.PgSqlException' in Devart.Data.PostgreSql.dll
Exception thrown: 'Devart.Common.k' in Devart.Data.PostgreSql.dll
Exception thrown: 'Devart.Data.PostgreSql.PgSqlException' in Devart.Data.PostgreSql.dll
Exception thrown: 'Devart.Common.k' in Devart.Data.PostgreSql.dll
Exception thrown: 'Devart.Data.PostgreSql.PgSqlException' in Devart.Data.PostgreSql.dll
Exception thrown: 'Devart.Common.k' in Devart.Data.PostgreSql.dll
Exception thrown: 'Devart.Data.PostgreSql.PgSqlException' in Devart.Data.PostgreSql.dll
Exception thrown: 'Devart.Common.k' in Devart.Data.PostgreSql.dll
.....
I use a PgSqlConnection and an Alerter like :
Code: Select all
Alerter = new PgSqlAlerter(_pgsqlConnection, $"_tableToSurvey.TableName}_create_update_delete_event");
Alerter.Stopped += OnAlerterStopped;
A way to get a notification ?