MainPipeClass 类
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
在数据流布局中添加和连接组件。
public ref class MainPipeClass : Microsoft::SqlServer::Dts::Pipeline::Wrapper::IDTSPipeline130, Microsoft::SqlServer::Dts::Pipeline::Wrapper::MainPipe
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.Guid("C4D4D1F8-B3EF-4A16-9E0B-BD837F067CAA")]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FCanCreate)]
public class MainPipeClass : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSPipeline130, Microsoft.SqlServer.Dts.Pipeline.Wrapper.MainPipe
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FCanCreate)]
[System.Runtime.InteropServices.Guid("A28DC28C-BEA5-4208-AED4-82EB7A1DB758")]
public class MainPipeClass : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSPipeline130, Microsoft.SqlServer.Dts.Pipeline.Wrapper.MainPipe
[System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)]
[System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FCanCreate)]
[System.Runtime.InteropServices.Guid("D9DA2996-AD06-4166-9C0C-C53E29834AF2")]
public class MainPipeClass : Microsoft.SqlServer.Dts.Pipeline.Wrapper.IDTSPipeline130, Microsoft.SqlServer.Dts.Pipeline.Wrapper.MainPipe
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.Guid("C4D4D1F8-B3EF-4A16-9E0B-BD837F067CAA")>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FCanCreate)>]
type MainPipeClass = class
interface IDTSPipeline100
interface MainPipe
interface IDTSObjectModel100
interface IDTSPipeline130
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FCanCreate)>]
[<System.Runtime.InteropServices.Guid("A28DC28C-BEA5-4208-AED4-82EB7A1DB758")>]
type MainPipeClass = class
interface IDTSPipeline100
interface MainPipe
interface IDTSObjectModel100
interface IDTSPipeline130
[<System.Runtime.InteropServices.ClassInterface(System.Runtime.InteropServices.ClassInterfaceType.None)>]
[<System.Runtime.InteropServices.TypeLibType(System.Runtime.InteropServices.TypeLibTypeFlags.FCanCreate)>]
[<System.Runtime.InteropServices.Guid("D9DA2996-AD06-4166-9C0C-C53E29834AF2")>]
type MainPipeClass = class
interface IDTSPipeline100
interface MainPipe
interface IDTSObjectModel100
interface IDTSPipeline130
Public Class MainPipeClass
Implements IDTSPipeline130, MainPipe
- 继承
-
MainPipeClass
- 属性
- 实现
示例
下面的代码示例将数据流任务添加到包,添加 OLE DB 源组件和 OLE DB 目标组件,并在两个组件之间建立路径。
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]);
}
}
}
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 IDTSComponentMetaData100 = mp.ComponentMetaDataCollection.New
mdOleDbSrc.ComponentClassID = "DTSAdapter.OleDbSource"
mdOleDbSrc.Name = "OLEDB Source"
Dim wrpOledbSrc As CManagedComponentWrapper = mdOleDbSrc.Instantiate
Dim mdOleDbDest As IDTSComponentMetaData100 = mp.ComponentMetaDataCollection.New
mdOleDbDest.ComponentClassID = "DTSAdapter.OleDbDestination"
mdOleDbDest.Name = "OLEDB Destination"
Dim wrpOledbDest As CManagedComponentWrapper = mdOleDbSrc.Instantiate
Dim path As IDTSPath100 = mp.PathCollection.New
path.AttachPathAndPropagateNotifications(mdOleDbSrc.OutputCollection(0), mdOleDbDest.InputCollection(0))
End Sub
End Class
End Namespace
注解
此类表示数据流任务,并在以编程方式生成数据流布局时使用。 通过将数据流任务添加到 Executables 集合 Package来创建类的实例。 组件使用 ComponentMetaDataCollection 属性添加到任务。 使用 PathCollection 属性在组件之间建立连接。
构造函数
MainPipeClass() |
初始化 MainPipeClass 的新实例。 |