我创建了一个应用程序并动态运行SSIS包。
但是在运行代码时,应用程序崩溃了。我看到了eventviewer,发现了以下异常
"Faulting module name: dts.dll, version: 2009.100.1600.1, time stamp: 0x4bb679b7 Exception code: 0xc0000005"..
请帮我解决这个问题..
DtsRunTime.Application app = new DtsRunTime.Application();
pkg = app.LoadPackage(packageName, null, true);
//set package varaibles
DtsRunTime.Variables vars = pkg.Variables;
IEnumerator<KeyValuePair<string, object>> varEnumarators = variablesMap.GetEnumerator();
while (varEnumarators.MoveNext())
{
KeyValuePair<string, object> item = varEnumarators.Current;
if (item.Value.ToString().Contains("@LoopCompanyId"))
vars[item.Key].Value = ReplaceParmeterValue(item.Value.ToString());
else
{
vars[item.Key].Value = item.Value;
}
}
//Application got crashed while executing this line of code
return pkg.Execute();