OdbcParameter.IsNullable Właściwość

Definicja

Pobiera lub ustawia wartość wskazującą, czy parametr akceptuje wartości null.

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

Wartość właściwości

true jeśli wartości null są akceptowane; w przeciwnym razie false. Wartość domyślna to false.

Atrybuty

Przykłady

Poniższy przykład tworzy element OdbcParameter i ustawia niektóre jego właściwości.

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;  
}  

Uwagi

Wartości null są obsługiwane przy użyciu DBNull klasy .

Dotyczy

Zobacz też