Compartir a través de


PipelineBuffer.SetEndOfRowset Method

Notifies the PipelineBuffer that a component has finished adding rows to the buffer.

Espacio de nombres: Microsoft.SqlServer.Dts.Pipeline
Ensamblado: Microsoft.SqlServer.PipelineHost (in microsoft.sqlserver.pipelinehost.dll)

Sintaxis

'Declaración
Public Sub SetEndOfRowset
public void SetEndOfRowset ()
public:
void SetEndOfRowset ()
public void SetEndOfRowset ()
public function SetEndOfRowset ()

Notas

Data flow components call this method when they have finished adding rows to an OutputPipelineBuffer. Calling SetEndOfRowset notifies the data flow engine that a component has finished adding rows to the PipelineBuffer.

The PipelineBuffer produces a NotOutputBufferException when the Mode of the PipelineBuffer is Input and this method is called.

Ejemplo

The following example shows a source component that calls SetEndOfRowset to signal that it is finished adding rows to the PipelineBuffer.

using System;
using Microsoft.SqlServer.Dts.Pipeline;
using Microsoft.SqlServer.Dts.Pipeline.Wrapper;
using Microsoft.SqlServer.Dts.Runtime.Wrapper;

namespace Microsoft.Samples.SqlServer.Dts
{
  [DtsPipelineComponent(DisplayName = "SampleComponent")]
  public class SampleSourceComponent: PipelineComponent
  {

    public override void ProvideComponentProperties()
    {
    IDTSOutput90 output = ComponentMetaData.OutputCollection.New();
    output.Name = "SourceOutput";

    IDTSOutputColumn90 column = output.OutputColumnCollection.New();
    column.Name = "Column1";
    column.SetDataTypeProperties(DataType.DT_R8, 0, 0, 0, 0);
    }

    public override void PrimeOutput(int outputs, int[] outputIDs, PipelineBuffer[] buffers)
    {
      double d = 123.5;
      buffers[0].AddRow();
      buffers[0].SetDouble(0, d);
      buffers[0].SetEndOfRowset();
    }
  }
}
Imports System 
Imports Microsoft.SqlServer.Dts.Pipeline 
Imports Microsoft.SqlServer.Dts.Pipeline.Wrapper 
Imports Microsoft.SqlServer.Dts.Runtime.Wrapper 
Namespace Microsoft.Samples.SqlServer.Dts 

 <DtsPipelineComponent(DisplayName="SampleComponent")> _ 
 Public Class SampleSourceComponent 
 Inherits PipelineComponent 

   Public  Overrides Sub ProvideComponentProperties() 
     Dim output As IDTSOutput90 = ComponentMetaData.OutputCollection.New 
     output.Name = "SourceOutput" 
     Dim column As IDTSOutputColumn90 = output.OutputColumnCollection.New 
     column.Name = "Column1" 
     column.SetDataTypeProperties(DataType.DT_R8, 0, 0, 0, 0) 
   End Sub 

   Public  Overrides Sub PrimeOutput(ByVal outputs As Integer, ByVal outputIDs As Integer(), ByVal buffers As PipelineBuffer()) 
     Dim d As Double = 123.5 
     buffers(0).AddRow 
     buffers(0).SetDouble(0, d) 
     buffers(0).SetEndOfRowset 
   End Sub 
 End Class 
End Namespace

Seguridad para subprocesos

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.

Plataformas

Plataformas de desarrollo

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Plataformas de destino

Para obtener una lista de las plataformas compatibles, vea Requisitos de hardware y software para instalar SQL Server 2005.

Vea también

Referencia

PipelineBuffer Class
PipelineBuffer Members
Microsoft.SqlServer.Dts.Pipeline Namespace