FindColumnByLineageID 메서드
Gets the location of a column in the specified IDTSBuffer100 object.
네임스페이스: Microsoft.SqlServer.Dts.Pipeline.Wrapper
어셈블리: Microsoft.SqlServer.DTSPipelineWrap(Microsoft.SqlServer.DTSPipelineWrap.dll)
구문
‘선언
Public Overridable Function FindColumnByLineageID ( _
hBufferType As Integer, _
nLineageID As Integer _
) As Integer
‘사용 방법
Dim instance As DTSBufferManagerClass
Dim hBufferType As Integer
Dim nLineageID As Integer
Dim returnValue As Integer
returnValue = instance.FindColumnByLineageID(hBufferType, _
nLineageID)
public virtual int FindColumnByLineageID(
int hBufferType,
int nLineageID
)
public:
virtual int FindColumnByLineageID(
[InAttribute] int hBufferType,
[InAttribute] int nLineageID
)
abstract FindColumnByLineageID :
hBufferType:int *
nLineageID:int -> int
override FindColumnByLineageID :
hBufferType:int *
nLineageID:int -> int
public function FindColumnByLineageID(
hBufferType : int,
nLineageID : int
) : int
매개 변수
- hBufferType
유형: System. . :: . .Int32
The ID of the IDTSBuffer100 object that contains the column.
- nLineageID
유형: System. . :: . .Int32
The lineage ID of the column to locate in the IDTSBuffer100.
반환 값
유형: System. . :: . .Int32
An Integer that indicates the location, by index, of the column in the IDTSBuffer100.
구현
IDTSBufferManager100. . :: . .FindColumnByLineageID(Int32, Int32)
주의
This method locates the column of an IDTSInput100 or IDTSOutput100 in the specified IDTSBuffer100. This method is necessary because an instance of a buffer contains all of the IDTSOutputColumn100 objects defined in the IDTSOutputColumnCollection100 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()
{
IDTSInput100 input = ComponentMetaData.InputCollection[0];
bufferColumnIndex = new int[BufferManager.GetColumnCount(input.Buffer)];
for( int col=0; col < input.InputColumnCollection.Count; col++)
{
IDTSInputColumn100 iCol = input.InputColumnCollection[col];
bufferColumnIndex[col] = BufferManager.FindColumnByLineageID(input.Buffer, iCol.LineageID);
}
}
Private bufferColumnIndex As Integer()
Public Overloads Overrides Sub PreExecute()
Dim input As IDTSInput100 = ComponentMetaData.InputCollection(0)
bufferColumnIndex = New Integer(BufferManager.GetColumnCount(input.Buffer) - 1) {}
Dim col As Integer = 0
While col < input.InputColumnCollection.Count
Dim iCol As IDTSInputColumn100 = input.InputColumnCollection(col)
bufferColumnIndex(col) = BufferManager.FindColumnByLineageID(input.Buffer, iCol.LineageID)
col -= 1
End While
End Sub