使用C#windows应用程序在两个sql server之间桥接 [英] bridge between two sql server using C# windows application
本文介绍了使用C#windows应用程序在两个sql server之间桥接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好,
如何从一个按钮单击导入/导出sqlServer2008数据库dabtabase服务器使用c#windows
应用程序在应用程序中另一个程序设计。
请告诉我怎么做???
Hello ,
How to do one button click import/export sqlServer2008 database from one dabtabase server to another programmetically in the application using c# windows
application.
plz tell me how to do it???
推荐答案
使用SSIS并创建一个包来执行此操作。然后使用c#application执行包。
Use SSIS and create a package to do this. Then use c# application to execute the package.
using Microsoft.SqlServer.Dts.Runtime;
namespace myApp
{
public class PackageExecuter
{
Package pkg;
Application app;
DTSExecResult pkgResults;
public PackageExecuter()
{
}
public void Run()
{
app = new Application();
pkg = app.LoadPackage("PackagePath", null);
pkgResults = pkg.Execute();
}
}
}
这篇关于使用C#windows应用程序在两个sql server之间桥接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文