SQLNotificationRequest sample application or case study

After using SQLDepdendency as the implementation of a queue in one of my projects (now live) and after finding that it was incorrectly broken (see http://rusanu.com/2008/01/04/sqldependencyonchange-callback-timing/ )

I am desperate for alternatives. I focus on using SQLNotificationRequest as a replacement that SQLDependency uses to create a convenient implementation by dynamically creating a queue service and a ServiceBroker at run time.

I browsed the internet but didn’t seem to find any good examples in SQLNotificationRequest, I looked here http://msdn.microsoft.com/en-us/library/3ht3391b(v=vs.80).aspx , but the code is broken and not works properly.

I also reviewed the code project, http://www.codeproject.com/Articles/18130/Advanced-SQL-SQLNotificationRequest-Functiona , but the author claims that the code is proof of the concept only and also does not behave as expected.

Does anyone have a good resource they came across regarding SQLNotificationRequest? Perhaps a book with a good example, or perhaps suggestions for fixing the code in link1?

I ran the code, but it continues to check notifications, and not just run when the database actually changes (the change counter is constantly working)

enter image description here

+4
source share

Source: https://habr.com/ru/post/1534787/


All Articles