I have a SSIS package that is run from a C# solution. When I run the package directly, any duplicate records are saved to a SQL table (All records), however when I run the same package from a C# solution, the duplicate rows are excluded and only records with unique IDs are stored to the SQL table. Any help or suggestions would be greatly appreciated.
Code from comments section below:
string pkgLocation = p;
Package pkg;
DTSExecResult pkgResults;
Variables vars;
Microsoft.SqlServer.Dts.Runtime.Application app = new Microsoft.SqlServer.Dts.Runtime.Application();
MyEventListener eventListener = new MyEventListener();
pkg = app.LoadPackage(pkgLocation, eventListener);
pkg.DelayValidation = true;
vars = pkg.Variables;
vars["User::Environment"].Value = "DEV";
pkgResults = pkg.Execute(null, vars, eventListener, null, null);
Comments
Post a Comment