问题描述
大家好,
在一个项目中,我在c#中设置了一个 SqlDependency
对象来从中检索数据数据库为 PostQueryNotification
。那工作正常。当我在该表中插入,更新或删除记录时,我创建的查询被触发为事件。
是否可以使用SQL MessageBroker和C# SQLDependency
作为StoredProcedure的结果集的事件。
我想要实现的是用户可以设置数据来创建一个报告。当报告(在内存数据中,而不是表中)完成时,我希望数据库用结果集推送。因此,无法通过查询对表或视图设置 SqlDependency
查询。
可以实现吗?
我尝试了什么:
我还没试过事情呢。由于我在一个项目中使用它,我看到了另一个项目的可能性,其中我希望存储过程的输出作为数据库推送的结果集。
Hi Everyone,
In a project I have setup a SqlDependency
object in c# to retrieve data from a database as PostQueryNotification
. That is working OK. The query I created gets fired as event when I insert, update or delete a record in that table.
Is it possible to use SQL MessageBroker and C# SQLDependency
as event for a resultset of a StoredProcedure.
What I want to achieve is that a user can set data to create a report. When the report (in memory data, not a table) is finished I want to be pushed by the database with the resultset. So the SqlDependency
query cannot be set by a query on a table or view.
Can that be achieved?
What I have tried:
I haven't tried a thing yet. Since I have used it in a project I see possibilities for another project with reports where I want the output of the Stored Procedure as resultset pushed by the database.
推荐答案
这篇关于存储过程输出的Sqldependency的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!