MainPipeClass Class
Adds and connects components in a data flow layout.
네임스페이스: Microsoft.SqlServer.Dts.Pipeline.Wrapper
어셈블리: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)
구문
‘선언
<ClassInterfaceAttribute(0)> _
<GuidAttribute("C3BF9DC1-4715-4694-936F-D3CFDA9E42C5")> _
<TypeLibTypeAttribute(2)> _
Public Class MainPipeClass
Implements IDTSPipeline90, MainPipe, IDTSObjectModel90
[ClassInterfaceAttribute(0)]
[GuidAttribute("C3BF9DC1-4715-4694-936F-D3CFDA9E42C5")]
[TypeLibTypeAttribute(2)]
public class MainPipeClass : IDTSPipeline90, MainPipe, IDTSObjectModel90
[ClassInterfaceAttribute(0)]
[GuidAttribute(L"C3BF9DC1-4715-4694-936F-D3CFDA9E42C5")]
[TypeLibTypeAttribute(2)]
public ref class MainPipeClass : IDTSPipeline90, MainPipe, IDTSObjectModel90
/** @attribute ClassInterfaceAttribute(0) */
/** @attribute GuidAttribute("C3BF9DC1-4715-4694-936F-D3CFDA9E42C5") */
/** @attribute TypeLibTypeAttribute(2) */
public class MainPipeClass implements IDTSPipeline90, MainPipe,
IDTSObjectModel90
ClassInterfaceAttribute(0)
GuidAttribute("C3BF9DC1-4715-4694-936F-D3CFDA9E42C5")
TypeLibTypeAttribute(2)
public class MainPipeClass implements IDTSPipeline90, MainPipe,
IDTSObjectModel90
주의
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.
Inheritance Hierarchy
System.Object
Microsoft.SqlServer.Dts.Pipeline.Wrapper.MainPipeClass
예
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.
IDTSComponentMetaData90 mdOleDbSrc = mp.ComponentMetaDataCollection.New();
mdOleDbSrc.ComponentClassID = "DTSAdapter.OleDbSource";
mdOleDbSrc.Name = "OLEDB Source";
CManagedComponentWrapper wrpOledbSrc = mdOleDbSrc.Instantiate();
// Add the OLE DB destination component.
IDTSComponentMetaData90 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.
IDTSPath90 path = mp.PathCollection.New();
path.AttachPathAndPropagateNotifications(mdOleDbSrc.OutputCollection[0], mdOleDbDest.InputCollection[0]);
}
}
}
Imports System
Imports Microsoft.SqlServer.Dts.Runtime
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper
Namespace Microsoft.Samples.SqlServer.Dts
Public Class Class1
Public Shared Sub Main(ByVal args As String())
Dim p As Package = New Package
Dim mp As MainPipe = CType(CType(p.Executables.Add("DTS.Pipeline"), TaskHost).InnerObject, MainPipe)
Dim mdOleDbSrc As IDTSComponentMetaData90 = mp.ComponentMetaDataCollection.New
mdOleDbSrc.ComponentClassID = "DTSAdapter.OleDbSource"
mdOleDbSrc.Name = "OLEDB Source"
Dim wrpOledbSrc As CManagedComponentWrapper = mdOleDbSrc.Instantiate
Dim mdOleDbDest As IDTSComponentMetaData90 = mp.ComponentMetaDataCollection.New
mdOleDbDest.ComponentClassID = "DTSAdapter.OleDbDestination"
mdOleDbDest.Name = "OLEDB Destination"
Dim wrpOledbDest As CManagedComponentWrapper = mdOleDbSrc.Instantiate
Dim path As IDTSPath90 = mp.PathCollection.New
path.AttachPathAndPropagateNotifications(mdOleDbSrc.OutputCollection(0), mdOleDbDest.InputCollection(0))
End Sub
End Class
End Namespace
스레드 보안
Any public static (Shared in Microsoft Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
플랫폼
개발 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
대상 플랫폼
지원되는 플랫폼 목록은 SQL Server 2005 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.
참고 항목
참조
MainPipeClass Members
Microsoft.SqlServer.Dts.Pipeline.Wrapper Namespace