共用方式為


ScriptBuffer.SetNull 方法

Makes the value of the specified column nullnull 參考 (在 Visual Basic 中為 Nothing).

命名空間:  Microsoft.SqlServer.Dts.Pipeline
組件:  Microsoft.SqlServer.TxScript (在 Microsoft.SqlServer.TxScript.dll 中)

語法

'宣告
Protected Sub SetNull ( _
    ColumnIndex As Integer _
)
'用途
Dim ColumnIndex As Integer 

Me.SetNull(ColumnIndex)
protected void SetNull(
    int ColumnIndex
)
protected:
void SetNull(
    int ColumnIndex
)
member SetNull : 
        ColumnIndex:int -> unit
protected function SetNull(
    ColumnIndex : int
)

參數

  • ColumnIndex
    型別:System.Int32
    The index of the column.

備註

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.

The developer does not have to use the SetNull method, because the derived classes contain a <ColumnX>_IsNull property for each column that you can use to specify a null value.

範例

The following sample code from the autogenerated BufferWrapper project item demonstrates how the Script component uses the SetNull method.

    Public WriteOnly Property [city_IsNull] As Boolean
        Set
            SetNull(1)
        End Set

End Property

請參閱

參考

ScriptBuffer 類別

Microsoft.SqlServer.Dts.Pipeline 命名空間