Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Collapse the table of content
Expand the table of content
Expand Minimize

PipelineComponent.PreExecute Method ()


Called after PrepareForExecute, and before PrimeOutput and ProcessInput.

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

Public Overridable Sub PreExecute

Component developers should factor as much functionality into PreExecute as possible because it is called one time per component instead of one time per buffer for ProcessInput. Components should locate the indexes of its input and output columns in the PipelineBuffer by calling the FindColumnByLineageID method of the BufferManager.

The following example shows how to locate the column indexes of the columns in the InputColumnCollection. They are stored in a local variable and then used in ProcessInput to access the columns in the PipelineBuffer.

Private bufferColumnIndex As Integer() 

Public Overrides Sub PreExecute() 
 Dim input As IDTSInput100 = ComponentMetaData.InputCollection(0) 
 bufferColumnIndex = New Integer(input.InputColumnCollection.Count - 1) {} 
 Dim x As Integer = 0 
 While x < input.InputColumnCollection.Count
   bufferColumnIndex(x) = BufferManager.FindColumnByLineageID(input.Buffer, input.InputColumnCollection(x).LineageID) 
   x -= 1
 End While 
End Sub 

Public Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer) 
 While buffer.NextRow 
   Dim x As Integer = 0 
   While x < bufferColumnIndex.Length 
     If Not buffer.IsNull(bufferColumnIndex(x)) Then 
     End If 
     x -= 1
   End While 
 End While 
End Sub
Return to top
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2015 Microsoft