locked
Invoke SSIS from C# RRS feed

  • Question

  • Hi.

    I am trying to invoke SSIS package from a c# code.  I also want to pass a parameter from my web code to ssis package. I tried the below:

    private void InvokeSSIS()
            {
                try
                {
                    string pkgLocation;
                    Package pkg;
                    Application app;
                    DTSExecResult pkgResults;
    
                    pkgLocation =
            @"LocalPath\Package.dtsx";
                    app = new Application();
                    pkg = app.LoadPackage(pkgLocation, null);  // error in this line
                    pkgResults = pkg.Execute();
     
                }
                catch (Exception ex)
                {
    
                }
    }

    I am getting the error - No overload for method 'LoadPackage' takes 2 arguments 

    Also, how should I pass a parameter to ssis package ?

    Thanks

    Tuesday, April 21, 2020 12:29 PM

Answers

All replies