Execute SSIS Package from C#.net

  • I created a simple SSIS package which executes successfully.

    But when i try to call the package from c#.net code, i am getting error.

    PFB the code i am using

    using System;

    using System.Collections.Generic;

    using System.Linq;

    using System.Text;

    using Microsoft.SqlServer.Dts.Runtime;

    namespace ConsoleApplication1

    {

    class Program

    {

    static void Main(string[] args)

    {

    Application app = new Application();

    Package package = app.LoadPackage("C:\\SISTest\\SSISTest\\Package.dtsx", null);

    DTSExecResult result = package.Execute();

    Console.WriteLine("Package Execution results: {0}", result.ToString());

    }

    }

    }

    I am getting the below Error.

    Retrieving the COM class factory for component with CLSID {E44847F1-FD8C-4251-B5DA-B04BB22E236E} failed due to the following error: 80040154.

    Please Help!!!!

  • Do you have SSIS 2005 installed on the machine where you execute the code above? The CLSID you have included above is for the Application object in 2005.

    ---
    SSIS Tasks Components Scripts Services | http://www.cozyroc.com/

  • Hi, thanks for your reply.

    I got this resolved by including the below two dlls in reference.

    Microsoft.SQLServer.DTSRuntimeWrap.dll

    Microsoft.SQLServer.ManagedDTS.dll

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply