Gets the next available ID that a data flow task generates.
네임스페이스: Microsoft.SqlServer.Dts.Pipeline.Wrapper
어셈블리: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)
구문
‘선언
<DispIdAttribute(126)> _
Public Overridable Function GetNextPasteID As Integer Implements IDTSPipeline90.GetNextPasteID
[DispIdAttribute(126)]
public virtual int IDTSPipeline90.GetNextPasteID ()
[DispIdAttribute(126)]
public:
virtual int GetNextPasteID () = IDTSPipeline90::GetNextPasteID
J#은 명시적 인터페이스 구현의 사용을 지원하지만 새로 선언하는 것은 지원하지 않습니다.
JScript는 명시적 인터페이스 구현의 사용을 지원하지만 새로 선언하는 것은 지원하지 않습니다.
반환 값
The next available unique ID in the data flow layout.
주의
The data flow task generates object IDs in sequence. This method retrieves the next available unique ID and increments.
예
The following code example demonstrates the sequential creation of IDs assigned to data flow objects.
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;
for(int x=0; x<10; x++)
{
Console.WriteLine("NextPasteID: " + mp.GetNextPasteID());
Console.WriteLine("MetaDataID: " + mp. ComponentMetaDataCollection.New().ID);
}
}
}
}
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 x As Integer = 0
While x < 10
Console.WriteLine("NextPasteID: " + mp.GetNextPasteID)
Console.WriteLine("MetaDataID: " + mp.ComponentMetaDataCollection.New.ID)
System.Math.Min(System.Threading.Interlocked.Increment(x),x-1)
End While
End Sub
End Class
End Namespace
The above code generates the following output.
NextPasteID: 1
MetaDataID: 2
NextPasteID: 3
MetaDataID: 4
NextPasteID: 5
MetaDataID: 6
NextPasteID: 7
MetaDataID: 8
NextPasteID: 9
MetaDataID: 10
NextPasteID: 11
MetaDataID: 12
NextPasteID: 13
MetaDataID: 14
NextPasteID: 15
MetaDataID: 16
NextPasteID: 17
MetaDataID: 18
NextPasteID: 19
MetaDataID: 20
스레드 보안
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 Class
MainPipeClass Members
Microsoft.SqlServer.Dts.Pipeline.Wrapper Namespace