使用C#.Net同步更新数据 [英] Syncronise updated Data using C#.Net

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

问题描述

大家好,

我想从一个数据库到另一个数据库定期同步处理来自不同表的数据.我只想找到一个数据库中进行的新更新,并想反映到其他数据库中.
我不知道更新记录的表.

例如.如果我在表X中添加一条记录,则其各自的转换会在数据库C的表B中受到影响.

所有数据库都将位于不同的网络服务器/位置上,例如-主服务器为A,我希望来自数据库c,d,e的更新可以位于不同的位置.

请帮忙.

问候,

Chirag.

Hi All,

I want to syncronise data from different Tables on periodic basis from one database to other. I want only to find the new updations made in one database and want to reflect to other respective database.
I dont know the tables in which the records are updated.

For eg. If I add a record in table X, its respective transation is affected in Table B of Database C.

All the database will be on differnet servers/Locations eg - Main Server is A and I want the updations from Database c,d,e which can be in different location.

Please Help.

Regards,

Chirag.

推荐答案

例如,您可以读取两个数据库并比较结果集以查找更改的行.这些行您必须更新...

您可以使用计时器定期执行此操作.

可能不是最好的解决方案,但是应该做到这一点.

问候
Piet
You could for example read both the databases and compare the result sets to find the changed rows. These rows you have to update...

you can use a timer for doing this periodically.

Probably not the best solution but this should do the it.

Regards
Piet


在第一个数据库中放置一个时间戳字段.在第二个数据库中存储先前的更新时间.然后,当您要更新第二个数据库时,定期选择第一个数据库中比第二个数据库中存储的先前更新时间新的所有记录,并将第二个数据库中的先前更新时间更新为当前时间以进行进一步更新.
Put a time stamp field in the first database. In the second database store the previous update time. Then periodically when you want to update the second database, select all the records in the first database which are newer than the previous update time stored in the second database and update the previous updated time in the second database to the present time for further updates.




您可以使用 Microsoft Synchronize Framework .

这将使您的数据库与其他方案同步.

希望对您有帮助,

谢谢
-Amit.
Hi,

You can use Microsoft Synchronize Framework.

This will synchronize your databases with different scenario.

hope this will help you,

thanks
-Amit.


这篇关于使用C#.Net同步更新数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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