You can't receive them as easily as you can the query notification. For
query notifications, there is a little program that runs on the server and
listens for query notification messages on a Service Broker queue. When it
receives one, it opens a network connection to your client and sends a
message which causes ADO.Net to call the callback function you specified.
This only works for query notifications because the service only listens on
the query notification queue and ADO.Net only handles query notification
messages.
If your application opens a normal database connection to the database on
the server, it can WAITFOR messages on any queue it chooses to and receive
messages sent to that queue, These could be sent by triggers, DDL Event
notifications, Trace Events, or any Service Broker application. The trick
here is you have to set up the Service Broker queues and Services and write
the client application that listens for the Service Broker messages. If you
like, you can even listen for Query Notification events this way instead of
using the ADO,Net listener.
--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Leila" <Leilas@hotpop.com> wrote in message
news:%23NvqJJzKGHA.3984@TK2MSFTNGP14.phx.gbl...
|