如何使用winforms中的c#.net将数据从一个数据库插入或更新到另一个数据库 [英] How to insert or update data from one database to another database using c#.net in winforms

查看:107
本文介绍了如何使用winforms中的c#.net将数据从一个数据库插入或更新到另一个数据库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友们,



我对winforms有要求。我想从一个数据库获取数据,并将数据插入或更新到另一个数据库。如果两个数据库中的数据相同,则无需修改。如果我们在第一个数据库中插入数据,并且数据移动到另一个数据库,并且如果在一个数据库中修改了任何数据,并且该数据应该更改为另一个数据库。



请帮助我......

解决方案

触发器可能有所帮助。我对触发器一无所知但认为它应该有帮助


您好,



这些可以提供帮助:



SQL Server复制 [ ^ ]



在Visual C#中使用ServicedComponent与.NET提供程序执行分布式事务。 NET



如何在SQLServer数据库的两个实例之间复制数据记录



SqlDependency Class


你好CH,

您可以使用SqlBulkCopy。



贝娄链接可以帮到你



使用C#.Net进行SQL批量复制 [ ^ ]



http://msdn.microsoft.com/en-us/library/system.data.sqlclient。 sqlbulkcopy.aspx [ ^ ]

Hi friends,

I have a requirement in winforms. i want to getting the data from one database and that data insert or update into another database. if same data in both databases, no need to modification. If we are inserting data in first database and that data moved to another Database and also if any data is modified in one database and that data should be changing into another database.

Please help me...

解决方案

Triggers may help. I have no knowledge on triggers but think it should help


Hi,

These can help:

SQL Server Replication[^]

Perform a Distributed Transaction with a .NET Provider by Using ServicedComponent in Visual C# .NET

How can I copy data records between two instances of an SQLServer database

SqlDependency Class


Hi CH,
You can use SqlBulkCopy.

bellow link can help you

SQL Bulk Copy with C#.Net[^]

http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqlbulkcopy.aspx[^]


这篇关于如何使用winforms中的c#.net将数据从一个数据库插入或更新到另一个数据库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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