错误模块名称:dts.dll,版本:2009.100.1600.1,时间戳:0x4bb679b7异常代码:0xc0000005

时间:2014-03-19 10:46:07

标签: c# ssis fault

我创建了一个应用程序并动态运行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();

0 个答案:

没有答案