Exemple #1
0
        private void Initialize(ExecutePackageTask execPackage)
        {
            string expression;

            if (Path.IsPathRooted(execPackage.RelativePath))
            {
                expression = String.Format("\"{0}\"", execPackage.RelativePath);
            }
            else
            {
                expression = SSISExpressionPathBuilder.BuildExpressionPath
                    (
                    Context.Package.PackageRelativeDirectory 
                    + Path.DirectorySeparatorChar 
                    + execPackage.RelativePath
                    );
            }

            string name = execPackage.RelativePath.Replace(Path.DirectorySeparatorChar, '_');
            name = name.Replace('.', '_');
            _execPackageTaskHost.Name = name + Guid.NewGuid().ToString();

            ConnectionConfiguration config = new ConnectionConfiguration();
            config.Name = name;
            config.Type = "FILE";
            config.ConnectionString = expression;

            SsisConnection connection = new SsisConnection(config);
            
            SSISTask.Connection = connection.ConnectionManager.Name;
        }
        public static PhysicalTask.ExecutePackageTask Lower(this AstTask.AstExecutePackageTaskNode astNode)
        {
            if (astNode.AsClassOnly)
            {
                return null;
            }

            PhysicalTask.ExecutePackageTask executePackageTask = new Ssis2008Emitter.IR.Task.ExecutePackageTask();
            executePackageTask.Name = astNode.Name;
            executePackageTask.RelativePath = astNode.RelativePath;

            return executePackageTask;
        }
Exemple #3
0
 public SsisExecutePackage(ExecutePackageTask execPackage, SSISEmitterContext context)
     : base(execPackage, context)
 {
     _execPackageTaskHost = (DTS.TaskHost)Context.SSISSequence.AppendExecutable("STOCK:ExecutePackageTask");
     Initialize(execPackage);
 }