Partilhar via


Propriedade do RDL IDTSOutput100.ExclusionGroup

Gets or sets the ExclusionGroup property of an IDTSOutput100 object.

Namespace:  Microsoft.SqlServer.Dts.Pipeline.Wrapper
Assembly:  Microsoft.SqlServer.DTSPipelineWrap (em Microsoft.SqlServer.DTSPipelineWrap.dll)

Sintaxe

'Declaração
Property ExclusionGroup As Integer 
    Get 
    Set
'Uso
Dim instance As IDTSOutput100 
Dim value As Integer 

value = instance.ExclusionGroup

instance.ExclusionGroup = value
int ExclusionGroup { get; set; }
property int ExclusionGroup {
    int get ();
    void set (int value);
}
abstract ExclusionGroup : int with get, set
function get ExclusionGroup () : int 
function set ExclusionGroup (value : int)

Valor da propriedade

Tipo: System.Int32
The ExclusionGroup of the IDTSOutput100 object.

Comentários

The ExclusionGroup property is set when two outputs are synchronous to the same IDTSInput100 object and you want to direct rows exclusively to one output or to the other. Both outputs must have the same value for their SynchronousInputID properties and for their ExclusionGroup properties. You must set this property to a nonzero value if you want to use an exclusion group; otherwise, leave the default value of zero.

During execution, data flow components that have multiple outputs with the same synchronous input and the same nonzero exclusion group direct rows from the input PipelineBuffer to one of the outputs using the DirectRow method, or, when the IsErrorOut property is true, the DirectErrorRow method.

Exemplos

The following code example demonstrates how the ExclusionGroup property is used when a data flow component has two outputs in the same exclusion group and the same synchronous input.

public override void ProvideComponentProperties()
{
    IDTSInput100 input = ComponentMetaData.InputCollection.New();
    Input.Name = "DTSSampleInput";

    IDTSOutput output = ComponentMetaData.OutputCollection.New();
    output.ExclusionGroup = 1;
    output.Name = "Output1";
    output.SynchronousInputID = input.ID;

    IDTSOutput output = ComponentMetaData.OutputCollection.New();
    output.ExclusionGroup = 1;
    output.Name = "Output2";
    output.SynchronousInputID = input.ID;
}
public override void ProcessInput(int inputID, PipelineBuffer buffer)
{
    IDTSInput100 input = ComponentMetaData.InputCollection.GetObjectByID(inputID);

    IDTSOutput100 output1 = ComponentMetaData.OutputCollection[0];
    IDTSOutput100 output2 = ComponentMetaData.OutputCollection[1];

    while( buffer.NextRow())
    {
        // If criteria is met, direct the buffer row to output1.
        buffer.DirectRow(output1.ID);
        // Otherwise, direct the row to output2.
        buffer.DirectRow(output2.ID);
    }
}
Public  Overrides Sub ProvideComponentProperties() 
 Dim input As IDTSInput100 = ComponentMetaData.InputCollection.New 
 Input.Name = "DTSSampleInput" 
 Dim output As IDTSOutput = ComponentMetaData.OutputCollection.New 
 output.ExclusionGroup = 1 
 output.Name = "Output1" 
 output.SynchronousInputID = input.ID 
 Dim output As IDTSOutput = ComponentMetaData.OutputCollection.New 
 output.ExclusionGroup = 1 
 output.Name = "Output2" 
 output.SynchronousInputID = input.ID 
End Sub 

Public  Overrides Sub ProcessInput(ByVal inputID As Integer, ByVal buffer As PipelineBuffer) 
 Dim input As IDTSInput100 = ComponentMetaData.InputCollection.GetObjectByID(inputID) 
 Dim output1 As IDTSOutput100 = ComponentMetaData.OutputCollection(0) 
 Dim output2 As IDTSOutput100 = ComponentMetaData.OutputCollection(1) 
 While buffer.NextRow 
   buffer.DirectRow(output1.ID) 
   buffer.DirectRow(output2.ID) 
 End While 
End Sub

Consulte também

Referência

IDTSOutput100 Interface

Namespace Microsoft.SqlServer.Dts.Pipeline.Wrapper