如何使用SQLServer Service Broker / SQLNotifications与Delphi7? [英] How to use SQLServer Service Broker/SQLNotifications with Delphi7?

查看:154
本文介绍了如何使用SQLServer Service Broker / SQLNotifications与Delphi7?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

delphi 7和mssql 2008是一个新的项目我不能改变的要求我开始工作,如果可能,我想要得到通知/事件,如果数据在服务器上更改,所以我不必调查问题是:

delphi 7 and mssql 2008 are requirements I can't change for a new project I'm starting to work and if possible I'd like to get notifications/events if data changes on the server so I don't have to poll so the question is:

是否可以使用D7的SQLService代理或类似的东西(正在阅读/思考串扰和ado.net,但只支持启动在D2007)?

is it possible to utilize SQLService broker with D7 or is there something similar (was reading/thinking about crosstalk and ado.net but support starts only at D2007)?

更新:只要绝对清楚,如果数据更改,我希望能够获得一个事件在某些表中(例如,在特定表上插入/更新),而不是如果表/数据库发生更改。

Update: Just to be absolutely clear, I want to be able to get an Event if data changes in certain tables (eg. insert/updates on specific tables) and not if a table/database changes.

推荐答案

是的,可以使用delphi访问由MSSQL Service Broker公开的通知和事件。为此,您可以使用 服务器事件的WMI提供程序 ,暴露了一组非常丰富的WMi事件和类。如果您是WMI新手,我建议您阅读这些文章 从Object Pascal Code Delphi和WMI Events 也可以使用 WMI Delphi代码创建者 创建一个Delphi代码段来访问 MSSQL Service Broker 的事件。

Yes, is possible use delphi to access to the notifications and Events exposed by the MSSQL Service Broker. To do this you can use the WMI Provider for Server Events which exposes a very rich set of WMi events and classes. If you are new to the WMI, I recommend you which read these articles Accesing the WMI from Object Pascal Code and Delphi and WMI Events also you can use the WMI Delphi Code Creator to create an Delphi snippet to access the events of the MSSQL Service Broker.

这篇关于如何使用SQLServer Service Broker / SQLNotifications与Delphi7?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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