ScriptBuffer 클래스
Serves as the base class for the read-only classes representing the input and the outputs that are generated by the Script component in the BufferWrapper project item in a Script component project.
상속 계층
System. . :: . .Object
Microsoft.SqlServer.Dts.Pipeline..::..ScriptBuffer
네임스페이스: Microsoft.SqlServer.Dts.Pipeline
어셈블리: Microsoft.SqlServer.TxScript(Microsoft.SqlServer.TxScript.dll)
구문
‘선언
Public Class ScriptBuffer
‘사용 방법
Dim instance As ScriptBuffer
public class ScriptBuffer
public ref class ScriptBuffer
type ScriptBuffer = class end
public class ScriptBuffer
ScriptBuffer 유형에서 다음 멤버를 표시합니다.
속성
이름 | 설명 | |
---|---|---|
Item | Gets or sets the value of a column in the buffer by using its index in the array of buffer column indexes. |
맨 위로 이동
메서드
이름 | 설명 | |
---|---|---|
AddRow | Adds an empty new row to the data flow buffer. | |
DirectRow | Directs a row to the specified output when a component has more than one available output. | |
EndOfRowset | Returns a value that indicates whether the end of the rows in a buffer has been reached. | |
Equals | (Object에서 상속됨) | |
Finalize | (Object에서 상속됨) | |
GetHashCode | (Object에서 상속됨) | |
GetType | (Object에서 상속됨) | |
IsNull | Returns a value that indicates whether the value of the specified column is nullNothingnullptrunitnull 참조(Visual Basic에서는 Nothing). | |
MemberwiseClone | (Object에서 상속됨) | |
NextRow | Tries to move to the next available row in the buffer and returns a value that indicates whether another row was available. | |
SetEndOfRowset | Indicates to the data flow that no more rows will be added to the output buffer. | |
SetNull | Makes the value of the specified column nullNothingnullptrunitnull 참조(Visual Basic에서는 Nothing). | |
ToString | (Object에서 상속됨) |
맨 위로 이동
주의
The ScriptBuffer class serves as the base class for the read-only classes representing the input and the outputs that are generated by the Script component in the BufferWrapper project item in a Script component project. The classes in the BufferWrapper project item provide the developer with a set of methods for working with the data flow buffers, as well as typed accessor properties for each column in the buffers.
The Script component developer does not use the ScriptBuffer class directly, but indirectly, through the derived classes in the BufferWrapper project item that represent the component's input and outputs.
For more information, see 스크립트 구성 요소 코딩 및 디버깅 and 스크립트 구성 요소 개체 모델 이해.
예
The following code sample from 스크립트 구성 요소를 사용하여 비동기 변환 만들기 demonstrates several methods and properties of the ScriptBuffer class, including AddRow, NextRow, EndOfRowset, and SetEndOfRowset.
Public Class ScriptMain
Inherits UserComponent
Private myRedmondAddressCount As Integer
Public Overrides Sub CreateNewOutputRows()
MySummaryOutputBuffer.AddRow()
End Sub
Public Overrides Sub MyAddressInput_ProcessInput(ByVal Buffer As MyAddressInputBuffer)
While Buffer.NextRow()
MyAddressInput_ProcessInputRow(Buffer)
End While
If Buffer.EndOfRowset Then
MyAddressOutputBuffer.SetEndOfRowset()
MySummaryOutputBuffer.MyRedmondCount = myRedmondAddressCount
MySummaryOutputBuffer.SetEndOfRowset()
End If
End Sub
Public Overrides Sub MyAddressInput_ProcessInputRow(ByVal Row As MyAddressInputBuffer)
With MyAddressOutputBuffer
.AddRow()
.AddressID = Row.AddressID
.City = Row.City
End With
If Row.City.ToUpper = "REDMOND" Then
myRedmondAddressCount += 1
End If
End Sub
End Class
스레드 보안
이 유형의 모든 공용 static(Visual Basic에서는 Shared) 멤버는 스레드로부터 안전합니다. 인스턴스 멤버는 스레드로부터의 안전성이 보장되지 않습니다.