Share via


SqlDependency aka Query Notification

From a question the other day I dug up an example I whipped up for a class back in Swindon, England. A BizTalk class of all things. The question:

Is there an alternative to polling databases for changes to keep a user interface up to date? Yes: Query Notification in SQL Server 2005. There are a lot of rules for what works and what doesn't and you'll have to create your own database for the attached sample to work, but it will give you a clear idea of how to use SqlDependency in a WinForm client.

CacheDemoWithQueryNotification.zip