Export (0) Print
Expand All

MainPipeClass Class

Adds and connects components in a data flow layout.

Object
  Microsoft.SqlServer.Dts.Pipeline.Wrapper.MainPipeClass

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

[TypeLibTypeAttribute(TypeLibTypeFlags.FCanCreate)]
[ClassInterfaceAttribute(ClassInterfaceType.None)]
[GuidAttribute("1CF081CA-677D-4561-967A-D06798F62DD6")]
public class MainPipeClass : IDTSPipeline100, 
	MainPipe, IDTSObjectModel100

The MainPipeClass type exposes the following members.

  NameDescription
Public methodMainPipeClassInitializes a new instance of the MainPipeClass.
Top

  NameDescription
Public propertyAutoGenerateIDForNewObjectsGets or sets a value that specifies whether a data flow automatically generates and sets the ID property for newly created objects.
Public propertyBLOBTempStoragePathGets or sets a value that specifies the file system location where binary large objects (BLOBs) are temporarily written to disk.
Public propertyBufferManagerGets the buffer manager for the main pipe.
Public propertyBufferTempStoragePathGets or sets the file system path used to temporarily cache buffer data.
Public propertyComponentMetaDataCollectionGets the collection of data flow components in the task.
Public propertyDefaultBufferMaxRowsGets or sets the maximum number of rows the task allows in an IDTSBuffer100 buffer.
Public propertyDefaultBufferSizeGets or sets the default size of the IDTSBuffer100 objects created by a task.
Public propertyEnableCacheUpdateGets or sets a value that indicates whether the data flow task enables cache updates.
Public propertyEnableDisconnectedColumnsGets or sets a value that indicates whether the task enables disconnected columns.
Public propertyEngineThreadsGets or sets the number of threads a data flow task uses.
Public propertyEventsSets the events interface that a data flow, and the components it contains, use to raise events during execution.
Public propertyIDTSObjectModel100_AutoGenerateIDForNewObjectsGets or sets a value that specifies whether a data flow automatically generates and sets the ID property for newly created objects.
Public propertyIDTSObjectModel100_ComponentMetaDataCollectionGets the collection of data flow components in the task.
Public propertyIDTSObjectModel100_EnableCacheUpdateGets or sets a value that indicates whether the data flow task enables the cache updates.
Public propertyIDTSObjectModel100_EnableDisconnectedColumnsGets or sets a value that indicates whether the data flow task enables the disconnected columns in the main pipe.
Public propertyIDTSObjectModel100_IsSavingXmlGets or sets a value that indicates the data flow task saves in Xml format.
Public propertyIDTSObjectModel100_PathCollectionGets the IDTSPathCollection100 collection for a data flow task.
Public propertyIsSavingXmlGets or sets a value that indicates whether the task saves in Xml format.
Public propertyPathCollectionGets the IDTSPathCollection100 collection for a data flow task.
Public propertyPersistenceCustomPropertyCollectionGets the persistence format of the data flow task's custom property collection.
Public propertyRunInOptimizedModeGets or sets a value that specifies whether a data flow task runs in optimized mode.
Public propertyVariableDispenserSets the IDTSVariableDispenser100 used to lock variables in a package for reading and writing.
Top

  NameDescription
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetNextPasteIDGets the next available ID that a data flow task generates.
Public methodGetObjectByIDRetrieves an object contained in a data flow task.
Public methodGetType (Inherited from Object.)
Public methodIDTSObjectModel100_GetObjectByIDRetrieves an object that is contained in a data flow task.
Public methodIDTSObjectModel100_NewResets the layout of components in a data flow task.
Public methodIDTSObjectModel100_UpdateCacheOnInputColumnsSets the data flow task to update the cache from previous version.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodNewInfrastructure. Creates a new instance of MainPipeClass.
Public methodToString (Inherited from Object.)
Public methodUpdateCacheOnInputColumnsSets the cache to upgrade from previous version.
Top

This class represents the data flow task, and is used when programmatically building a data flow layout. An instance of the class is created by adding the data flow task to the Executables collection of a Package. Components are added to the task using the ComponentMetaDataCollection property. Connections are established between components using the PathCollection property.

The following code example adds a data flow task to a package, adds an OLE DB source component and an OLE DB destination component, and establishes a path between the two components.

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)
        {
            // Create the package.
            Package p = new Package();

            // Add the data flow task.
            MainPipe mp = ((TaskHost)p.Executables.Add("DTS.Pipeline")).InnerObject as MainPipe;

            // Add the OLE DB source component.
            IDTSComponentMetaData100 mdOleDbSrc = mp.ComponentMetaDataCollection.New();
            mdOleDbSrc.ComponentClassID = "DTSAdapter.OleDbSource";
            mdOleDbSrc.Name = "OLEDB Source";
            CManagedComponentWrapper wrpOledbSrc = mdOleDbSrc.Instantiate();

            // Add the OLE DB destination component.
            IDTSComponentMetaData100 mdOleDbDest = mp.ComponentMetaDataCollection.New();
            mdOleDbDest.ComponentClassID = "DTSAdapter.OleDbDestination";
            mdOleDbDest.Name = "OLEDB Destination";
            CManagedComponentWrapper wrpOledbDest = mdOleDbSrc.Instantiate();

            // Create a path and attach the output of the source to the input of the destination.
            IDTSPath100 path = mp.PathCollection.New();
            path.AttachPathAndPropagateNotifications(mdOleDbSrc.OutputCollection[0], mdOleDbDest.InputCollection[0]);
        }
    }
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft