Notification services
-
Hello, I'm creating a windows service that listens to a sql server database table each second when any insertion occurs this windows service make a lot of work, to accomplish this task I firstly think in the notification services but it creates an auto generated windows service which I can not edit to do my logic and in the same time it works(the notification services) just like my windows service in listening to the table every Generator Quanta. The question is which is the best implementing my one windows service or using the notification services to send notifications to filesystemwatcher then my service check this file every second? Thanks
Dad
-
Hello, I'm creating a windows service that listens to a sql server database table each second when any insertion occurs this windows service make a lot of work, to accomplish this task I firstly think in the notification services but it creates an auto generated windows service which I can not edit to do my logic and in the same time it works(the notification services) just like my windows service in listening to the table every Generator Quanta. The question is which is the best implementing my one windows service or using the notification services to send notifications to filesystemwatcher then my service check this file every second? Thanks
Dad
Could you use SqlDependency instead. For example have a look at: Detecting Changes with SqlDependency (ADO.NET)[^]
The need to optimize rises from a bad design.My articles[^]
-
Could you use SqlDependency instead. For example have a look at: Detecting Changes with SqlDependency (ADO.NET)[^]
The need to optimize rises from a bad design.My articles[^]
Can SqlDependency detect when a row is inserted?
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
-
Can SqlDependency detect when a row is inserted?
Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion
Yes, since if the result set based on the select statement is changed, the OnChange event is triggered. This actually means that all modifications (updates, inserts and deletes) are notified as long as they change the result. Or at least this is my understanding :) There's a bit old but quite good documentation about this: Query Notifications in ADO.NET 2.0 [^] Mika
The need to optimize rises from a bad design.My articles[^]