开发者

Webservice for Watching a Table in SQL server and populating it

Can we write a web service to watch a table in sql server. whenever th开发者_Go百科e corresponding table is populated with new records, the new records should appended to the another table which has the same structure of the old one.

Is this is possible using webservices if not how to perform this.


Yes, but webservice will be just fetching results of your modification.. I don't thing it will ever monitor your table changes. To monitor table changes you can use trigger on different actions that is performed on the table and stored in another table. Your web service will just read these updates and provide you the details.


You can definitely quite easily publish the contents of a table in SQL Server to the web - e.g. using WCF Data Services.

But you cannot have the webservice "push" the changes to its clients, e.g. the webservice cannot detect changes and then notify the clients. The clients have to come and ask the web service for the data ("pull" model).

If you need to be able to notify clients of changes, you might be better off posting a message onto a message queue (like MSMQ) and have the clients who are interested in that data notification listen on that queue for new messages to show up.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜