Quantcast
Channel: SQL Server Integration Services forum
Viewing all articles
Browse latest Browse all 24688

Invoke SSIS from C#

$
0
0

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


Viewing all articles
Browse latest Browse all 24688

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>