C#调用SQL Server 2008 SSIS(Dtsx包)
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.SqlServer.Dts.Runtime;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Application app = new Application();
Package package = app.LoadPackage("D:\\WebSite1\\Package.dtsx", null);
DTSExecResult result = package.Execute();
Response.Write(String.Format("Package Execution results: {0}", result.ToString()));
}
}
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Microsoft.SqlServer.Dts.Runtime;
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void Button1_Click(object sender, EventArgs e)
{
Application app = new Application();
Package package = app.LoadPackage("D:\\WebSite1\\Package.dtsx", null);
DTSExecResult result = package.Execute();
Response.Write(String.Format("Package Execution results: {0}", result.ToString()));
}
}