Reputation: 737
The scenario is as follows:
I need to know the flow which step 4 works. I read about using SqlDependency
and have looked at this article http://rusanu.com/2007/11/01/remove-pooling-for-data-changes-from-a-wcf-front-end/
However if I'm not wrong this article uses Notification Services which is deprecated in SQL Server 2008. I would also like to know how to register code in the client when it is detected that there is a change in query result in database. Thanks
Edited
Currently the options are SqlDependency, trigger, WCF, Observer pattern. If anyone knows if anyone of these solutions can/cannot be implemented in my scenario please feel free to comment and let me know.
Upvotes: 1
Views: 970
Reputation: 5646
You are wrong, article does not use Notification Services. Following is used in the article:
So, none of this technologies uses deprecated Notification Services. Everything you need to start (even if you use SQL Server 2012) is described in that article.
Upvotes: 1
Reputation: 922
You can do this in Application layer. You can have a centralize method/class to update files in your database. Then you can register observers(Observer pattern) to get notification of any updates. In this way you can refresh multiple clients when data changes in database.
Above suggestion will work only if there is no data change from other process or direct DB updates.
Upvotes: 2