注意通过WCF SQL Adapter在数据库中更新或删除 [英] Notice update or delete in Database via WCF SQL Adapter

查看:69
本文介绍了注意通过WCF SQL Adapter在数据库中更新或删除的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hi Folks,

我尝试通过SQL Adapter注意数据库表中的任何更改:所以我检查一个包含'0'的特殊列,用于新数据集和对于那些我已经通过BizTalk复制的人来说,"1"。

i try to notice any changes in a database table via SQL Adapter: so i check for a special column wich contains '0' for new datasets and '1' for those i already copied via BizTalk.

只要您只插入数据集,更新或删除未重新定位,这样就可以正常工作...

This works fine as long as you only insert datasets, update or delete is not recocnized...

对这些行为做出最佳或可能的反应是什么?

Whats the best or possible way to react on these actions too?

感谢您的想法!

推荐答案

我很有希望有很多不同的方法,所以这里是我的想法:

I am shure there are many different approaches so here is what I have in mind:

如果您需要对原始表中已删除的行做出反应,则需要一个子表来触发不再存在的数据集的biztalk。

In case you need to react to deleted rows in your original table you need a sub table to trigger your biztalk for datasets that do not exist any longer.

在此表中,您需要2个列:

In this table you need 2 colums:

第一个与原始数据行(id)相关联,

first one to correlate to your original data row (id),

第二个保持状态:对于前者0 =新,1 =更新,3 =删除

second one to hold the status: For ex. 0= new, 1=update, 3=deleted

然后你需要一个
触发器
事件,用于在新表格中设置已修改数据ID的状态。

Then you need a Trigger event on your original table that sets the status for the modified data id in your new table.

然后,您可以对此子页面进行轮询 您在问题中已经提到的表格。

You can then poll on this sub table as you already mentioned in your question.


这篇关于注意通过WCF SQL Adapter在数据库中更新或删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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