Liten / Notify

Liten / Notify

Postby jkucera » Thu 12 Jul 2007 17:27

Hi, I've seen the support for Listen/Notify is there since 3.00 version. Maybe I missed something but how the command LISTEN is implemented. The handling of notifications is implemented as PgSqlConnection event, but how to "subscribe" to listen?
jkucera
 
Posts: 10
Joined: Wed 27 Jun 2007 08:39

Postby Alexey » Fri 13 Jul 2007 10:17

You should execute PgSqlCommand with "listen" keyword. This will subscribe you to the event. When notification trigger in your database fires, you will get Notification event in PgSqlConnection. Note that asynchronous notifications are not supported yet, so you'll need to execute something to get notification event.
Alexey
 
Posts: 2756
Joined: Mon 13 Mar 2006 07:43


Return to dotConnect for PostgreSQL