Using System; Using System. Collections. Generic; Using System. LINQ; Using System. text; Using Dtsmanage = Microsoft. sqlserver. DTS. runtime; Namespace Tn. synthemployee { Class Program { Static Void Main ( String [] ARGs ){ String Path = system. configuration. configurationmanager. receivettings [" Packagepath "]; String Tablesource = system. configuration. configurationmanager. receivettings [" Temp_viewhrinfo "]; Dtsmanage. Package package; dtsmanage. Application dtsapp = New Dtsmanage. Application (); Package = dtsapp. loadpackage (path, Null ); Try {Console. writeline (datetime. Now. tostring () +" : Load SSIS package success ");// Obtain the parameter type // The parameters in the SSIS package are obtained in the form of package. Variables ["key"], where key is the parameter name. Type T = package. Variables [" Tablename "]. GetType (); // Parameter value assignment Package. Variables [" User: tablename "]. Value = convert. changetype (tablesource, T); dtsmanage. dtsexecresult pkgresults = package. Execute (); If (Pkgresults = dtsmanage. dtsexecresult. Failure) {console. writeline (datetime. Now. tostring () +" : DTS package run faild ");}Else {Console. writeline (datetime. Now. tostring () +" : DTS package run success ");}} Catch (Exception ex) {console. writeline (ex. tostring ());} Finally {Package. Dispose () ;}console. Readline ();}}}