asp.net中的SQLDependency类 [英] SQLDependency class in asp.net

查看:83
本文介绍了asp.net中的SQLDependency类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法可以配置我的SQL,以便使用SQLDependency类的查询通知只会针对表上的INSERT opertion触发?换句话说,每当我将数据插入表中时,我都会收到通知。我不希望UPDATE上的通知。请做必要的

Is there any way where i can configure my SQL, so that the Query Notifications using SQLDependency class will fire only for INSERT opertion on a table? In other words whenever i INSERT data into a table i should get a notification. I dont want the notification on UPDATE. Please do the needful

推荐答案

使用 SqlNotificationInfo [ ^ ]枚举以获取有关通知事件的其他信息。



有关详细信息,请参阅:

监控数据更改使用SqlDependency和C# [ ^ ]

使用SqlDependency检测更改 [ ^ ]
Use SqlNotificationInfo[^] enumeration to get additional information about notification event.

For further information, please see:
Monitoring data change using SqlDependency and C#[^]
Detecting Changes with SqlDependency[^]


在ASP.NET应用程序中?为什么?



网络应用程序无法将通知推送到客户端,因此没有理由使用它。
In an ASP.NET app?? Why?

A web application cannot push notifications to the client so there's little reason to use it.


这篇关于asp.net中的SQLDependency类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆