3

I have an SSIS package which in turn uses multiple child packages in it with execute package task. I am trying to run the parent package prorammatically using code similar to the following:

Application app = new Application();
Package package = app.LoadPackage(ConfigurationManager.AppSettings["PackagePath"], null);
DTSExecResult results = package.Execute();

But when I execute the package I get an exception saying "There is no project to reference". How do I reference the child packages?

4

2 回答 2

1

您是否在父 SSIS 包中使用“项目参考”的 ReferenceType?如果是这样,将其更改为“外部参考”,并提供包的文件路径,如this question所示。

于 2015-03-04T16:55:08.353 回答
0

我不知道如何使用文件系统路径来做到这一点。但是,通过使用类似于以下链接中解释的代码,将带有父包和子包的项目部署到 SSIS 目录后,我能够使其工作。

http://muxtonmumbles.blogspot.com/2012/08/programmatically-executing-packages-in.html

于 2013-07-15T22:58:05.740 回答