It’s been a while since I used the SqlDependency class and the features it provides, and was then quite disappointed that I hadn’t a copy of the plumbing code anywhere on my web clipboard (a.k.a darkside.co.za). I’ve put together a static helper class that you can attach an event to, and then call the Start(…) method. Here is the code for the class (UPDATE: or you can download it here): 1 using System.Data;
2 using System.Data.SqlClient;
3
4 namespace Darkside
5 {
6 public class SqlNotificationHelper
...