OdbcParameter.IsNullable 屬性

定義

取得或設定一個值,指示參數是否接受空值。

public:
 property bool IsNullable { bool get(); void set(bool value); };
public:
 virtual property bool IsNullable { bool get(); void set(bool value); };
[System.ComponentModel.Browsable(false)]
public bool IsNullable { get; set; }
public override bool IsNullable { get; set; }
[<System.ComponentModel.Browsable(false)>]
member this.IsNullable : bool with get, set
member this.IsNullable : bool with get, set
Public Property IsNullable As Boolean
Public Overrides Property IsNullable As Boolean

屬性值

true 若接受空值;否則 false。 預設值為 false

屬性

範例

以下範例建立 並 OdbcParameter 設定其部分性質。

Public Sub CreateOdbcParameter()
   Dim parameter As New OdbcParameter("Description", OdbcType.VarChar, 88)
   parameter.IsNullable = True
   parameter.Direction = ParameterDirection.Output
End Sub
public void CreateOdbcParameter()
{
   OdbcParameter parameter = new OdbcParameter("Description", OdbcType.VarChar, 88);
   parameter.IsNullable = true;
   parameter.Direction = ParameterDirection.Output;
}

備註

空值則使用類別 DBNull 來處理。

適用於

另請參閱