同步过滤数据 [英] Sync'ing Filtered Data

查看:85
本文介绍了同步过滤数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的方案 - 我正在使用Sync Services将SqlCe客户端与Oracle后端同步。我有一个表有一个字段AssignedTo的案例。增量使用where子句来过滤同步到客户端的数据(仅下载) - 例如select = from assignedto ="someuser"的情况。

如果记录在主服务器上更改了assignedid字段,如何在客户端上识别和处理数据?

Here's my scenario - I'm using Sync Services to sync a SqlCe client with an Oracle backend.  I have a table Cases with a field AssignedTo.  The incrementals use a where clause to filter the data sync'ed to the client (download only) - e.g. select * from cases where assignedto = "someuser".

How do I identify and handle data on the client if a record has the assignedto field changed on the master?

推荐答案

hi viperguynaz,

我处理这个问题的解决方案是分离"赋值"。来自实际的对象。所以我建议让你的表格"案例"和另一个表"赋值"为用户分配案例。

在您的插入/更新/删除脚本中,您现在可以使用分配表的跟踪信息(连接将执行该操作)。

此解决方案是什么也解决了我的方式,这样我也可以同步"旧"在他们被新分配给用户之后的情况(比如说有锚x)虽然这个用户的案例表已经在锚点x +东西。

hth,
Andreas
hi viperguynaz,

my solution to deal with this issue was to seperate the "assignment" from the actual object. So I would recommend to have your table "cases" and another table "assignment" that assigns a case to an user.

In your insert/update/delete scripts you can now use the tracking information of the assignment table (joins will do the thing).

What this solution also solved for me was that this way I could also sync "old" cases (say having anchor x) after they were newly assigned to a user although the cases table for this user already was at anchor x + something.

hth,
Andreas


这篇关于同步过滤数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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