How to make SQL rise an event at SQL Client

浪尽此生 提交于 2019-12-13 07:29:09

问题


I need to create ConsoleApp in C# which is going to write something on local disk of client corresponding of data added to SQL Server by others. Now I do not know is there a way to SQL rise an event at client.
My idea is to periodicity check for new data by opening connection and selecting data.
Before I start coding Ill like to explore others ways of communicate from SQL Server to SQL Client.
Another idea is to make CLR at SQL side which is going to be triggered by trigger on table where data is inserted.


回答1:


Perhaps Query Notifications is what you're looking for. Easy to use and quite reliable, in my experience.

You still have to make your query once, of course, but you sign up for events which let you know when the result set of the query have changed, so that you can then grab the new data.



来源:https://stackoverflow.com/questions/3749182/how-to-make-sql-rise-an-event-at-sql-client

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!