Update C# client whenever database is updated

后端 未结 3 1279
我在风中等你
我在风中等你 2020-12-05 17:04

I am using MySQL with C# / Visual Studio 2008. I need to know any method so that if one user updates the database, all the logged in users over the network, are notified tha

3条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-05 17:45

    Quite a long answer, but your best bet would be something like SqlCacheDependency.

    Also you could use something called the "Reverse AJAX" technique, which is used by Google Mail notifications, and talked about here: How does incoming mail notification on Gmail works?

    Besides those two, your own other options AFAIK is simple server polling.

    Also, you haven't mentioned what your client is.

    Is it a public web site on the internet? Is it an intranet app, it is a WPF app?

    If it's a web site, you're best best is client-side callbacks using the Reverse AJAX technique i mentioned.

提交回复
热议问题