OdbcParameter.IsNullable プロパティ

定義

パラメーターが null 値を受け入れるかどうかを示す値を取得または設定します。

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 null 値が受け入れられる場合。それ以外の場合は 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;
}

注釈

null 値は、 DBNull クラスを使用して処理されます。

適用対象

こちらもご覧ください