Click here to Skip to main content
12,954,764 members (66,695 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am using Script Task in SSIS to consume WCF Service which has custom binding,included the config information under DtsDebugHost.exe.config as i have no other option,till here it is fine,now i need to call the SSIS package from c# which i am not able to do.
Posted 30-Jan-13 0:52am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Add following reference in your project - Microsoft.SqlServer.ManagedDTS
And in namespace add using Microsoft.SqlServer.Dts.Runtime;

protected void btn_get_Click(object sender, EventArgs e)
Microsoft.SqlServer.Dts.Runtime.Application MyApp = new Application();
MyApp.PackagePassword = "abcd"; //if SSIS package is procted by password.
Package Mypac = MyApp.LoadPackage(@"<ssis package="" path="">", null);
DTSExecResult Myres = Mypac.Execute();
//This is to find exact error while executing SSIS package.
if (Myres == Microsoft.SqlServer.Dts.Runtime.DTSExecResult.Failure)
string err = "";
foreach (Microsoft.SqlServer.Dts.Runtime.DtsError local_DtsError in Mypac.Errors)
string error = local_DtsError.Description.ToString();
err = err + error;
txt_result.Text = err.ToString();

Hope this may help you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

    Print Answers RSS
Top Experts
Last 24hrsThis month
OriginalGriff 6,539
CHill60 3,490
Maciej Los 3,153
ppolymorphe 2,030
Jochen Arndt 1,975

Advertise | Privacy | Mobile
Web01 | 2.8.170525.1 | Last Updated 20 Feb 2014
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100