Export (0) Print
Expand All

PipelineComponent.BufferManager Property

Gets the IDTSBufferManager100 of the pipeline component.

This API is not CLS-compliant. 

Namespace:  Microsoft.SqlServer.Dts.Pipeline
Assembly:  Microsoft.SqlServer.PipelineHost (in Microsoft.SqlServer.PipelineHost.dll)

'Declaration
<CLSCompliantAttribute(False)> _
Public ReadOnly Property BufferManager As IDTSBufferManager100 
	Get
'Usage
Dim instance As PipelineComponent 
Dim value As IDTSBufferManager100 

value = instance.BufferManager

The BufferManager is a read only, execution-time property that is first available to components in the PreExecute method.

The FindColumnByLineageID method is used to locate a component's columns in the IDTSInputColumnCollection100 or IDTSOutputColumnCollection100 of the component, in the PipelineBuffer. This is necessary because the number of columns contained in the PipelineBuffer may exceed the number of columns expected by the component.

The BufferManager is also used to create new IDTSBuffer100 objects using the CreateBuffer, CreateFlatBuffer, and CreateVirtualBuffer methods. However, these methods are not supported from managed code, and should only be used when writing native C++ components.

The following code example shows how to use the BufferManager property to locate the columns in a PipelineBuffer row.

Imports System 
Imports Microsoft.SqlServer.Dts.Pipeline 
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper 
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper 
Namespace Microsoft.Samples.SqlServer.Dts 

 Public Class SampleComponent 
 Inherits PipelineComponent 

   Public Overrides Sub ProcessInput(ByVal InputID As Integer, ByVal buffer As PipelineBuffer) 
     Dim i As IDTSInput100 = ComponentMetaData.InputCollection.GetObjectByID(InputID) 
     For Each col As IDTSInputColumn100 In i.InputColumnCollection 
       Dim colIndex As Integer = BufferManager.FindColumnByLineageID(i.Buffer, col.LineageID) 
       Dim bc As BufferColumn = buffer.GetColumnInfo(colIndex) 
     Next 
   End Sub 
 End Class 
End Namespace
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft