Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C# SSIS
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 1: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(@"", 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
0 OriginalGriff 7,215
1 DamithSL 5,114
2 Maciej Los 4,866
3 Sergey Alexandrovich Kryukov 4,747
4 Kornfeld Eliyahu Peter 4,514

Advertise | Privacy | Mobile
Web02 | 2.8.141223.1 | Last Updated 20 Feb 2014
Copyright © CodeProject, 1999-2014
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