MainPipeClass.ComponentMetaDataCollection Property


Gets the collection of data flow components in the task.

Namespace:   Microsoft.SqlServer.Dts.Pipeline.Wrapper
Assembly:  Microsoft.SqlServer.DTSPipelineWrap (in Microsoft.SqlServer.DTSPipelineWrap.dll)

public virtual IDTSComponentMetaDataCollection100 ComponentMetaDataCollection {

This collection contains the data flow components that have been added to the task. Components are created and added to the collection by calling the New method.

The following code example shows how to add and initialize a new component in the collection.

using System;
using Microsoft.SqlServer.Dts.Runtime;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;

namespace Microsoft.Samples.SqlServer.Dts
    public class Class1
        public static void Main( string []args )
            Package p = new Package();
            MainPipe mp = ((TaskHost)p.Executables.Add("DTS.Pipeline")).InnerObject as MainPipe;
            IDTSComponentMetaData100 md = mp.ComponentMetaDataCollection.New();
            md.ComponentClassID = "DTSAdapter.OleDbSource";
            CManagedComponentWrapper wrp = md.Instantiate();
Return to top