I have different instances of an [.NET 3.5] C# win forms application that run on different machines.
All instances use the same SQL 2005 db.
I need to send an alert an开发者_StackOverflow社区d to refresh grids [contained in user controls] when another instance of the application changes smth in db.
Which is the best way ?
Thank you very much.
AS David said one of the options is SqlDependency when SQL server itself sends notifications when data is changed. But you can also use WCF(or any other distributed solution) to keep communication between 2 instances and notify each other...
Use an SqlDepedency. This can be done in WinForms as well as Asp.NET.
See this video: http://windowsclient.net/learn/video.aspx?v=27881
(pay attention to the technical note for prerequisites)
精彩评论