다음을 통해 공유


DTSBufferManagerClass.FindColumnByLineageID Method

Gets the location of a column in the specified IDTSBuffer90 object.

네임스페이스: Microsoft.SqlServer.Dts.Pipeline.Wrapper
어셈블리: Microsoft.SqlServer.DTSPipelineWrap (in microsoft.sqlserver.dtspipelinewrap.dll)

구문

‘선언
<DispIdAttribute(121)> _
Public Overridable Function FindColumnByLineageID ( _
    <InAttribute> hBufferType As Integer, _
    <InAttribute> nLineageID As Integer _
) As Integer Implements IDTSBufferManager90.FindColumnByLineageID
[DispIdAttribute(121)] 
public virtual int IDTSBufferManager90.FindColumnByLineageID (
    [InAttribute] int hBufferType,
    [InAttribute] int nLineageID
)
[DispIdAttribute(121)] 
public:
virtual int FindColumnByLineageID (
    [InAttribute] int hBufferType, 
    [InAttribute] int nLineageID
) = IDTSBufferManager90::FindColumnByLineageID
J#은 명시적 인터페이스 구현의 사용을 지원하지만 새로 선언하는 것은 지원하지 않습니다.
JScript는 명시적 인터페이스 구현의 사용을 지원하지만 새로 선언하는 것은 지원하지 않습니다.

매개 변수

  • hBufferType
    The ID of the IDTSBuffer90 object that contains the column.
  • nLineageID
    The lineage ID of the column to locate in the IDTSBuffer90.

반환 값

An Integer that indicates the location, by index, of the column in the IDTSBuffer90.

주의

This method locates the column of an IDTSInput90 or IDTSOutput90 in the specified IDTSBuffer90. This method is necessary because an instance of a buffer contains all of the IDTSOutputColumn90 objects defined in the IDTSOutputColumnCollection90 of the components in a graph. Components cannot rely on using the index location of an output column or input column as the index of that column in a buffer row. Because of this, components must use the FindColumnByLineageID method to locate the columns in the buffer.

The following code example shows how a transformation component that does not have output columns uses FindColumnByLineageID to locate its input columns in the buffer.

int[] bufferColumnIndex;
public override void PreExecute()
{
    IDTSInput90 input = ComponentMetaData.InputCollection[0];
    bufferColumnIndex = new int[BufferManager.GetColumnCount(input.Buffer)];

    for( int col=0; col < input.InputColumnCollection.Count; col++)
    {
        IDTSInputColumn90 iCol = input.InputColumnCollection[col];
        bufferColumnIndex[col] = BufferManager.FindColumnByLineageID(input.Buffer, iCol.LineageID);
    }
}
Private bufferColumnIndex As Integer() 

Public Overloads Overrides Sub PreExecute() 
 Dim input As IDTSInput90 = ComponentMetaData.InputCollection(0) 
 bufferColumnIndex = New Integer(BufferManager.GetColumnCount(input.Buffer) - 1) {} 
 Dim col As Integer = 0 
 While col < input.InputColumnCollection.Count 
   Dim iCol As IDTSInputColumn90 = input.InputColumnCollection(col) 
   bufferColumnIndex(col) = BufferManager.FindColumnByLineageID(input.Buffer, iCol.LineageID) 
   col -= 1 
 End While 
End Sub

스레드 보안

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 설치를 위한 하드웨어 및 소프트웨어 요구 사항을 참조하십시오.

참고 항목

참조

DTSBufferManagerClass Class
DTSBufferManagerClass Members
Microsoft.SqlServer.Dts.Pipeline.Wrapper Namespace