DB2Parameter.IsNullable Property
Gets or sets a value indicating whether the parameter accepts null values.
- Namespace:
IBM.Data.DB2
- Assembly:
IBM.Data.DB2
(inIBM.Data.DB2.dll
)
Syntax
[Visual Basic]
Public Property IsNullable As Boolean Implements _
IDataParameter.IsNullable
[C#]
public bool IsNullable {get; set;}
[C++]
public: __property bool get_IsNullable();
public: __property void set_IsNullable(bool);
[JScript]
public function get IsNullable() : Boolean;
public function set IsNullable(Boolean);
- Implements:
- IDataParameter.IsNullable
Property value
true
if
null values are accepted; otherwise, false
. The default
is false
.
Remarks
Null values are handled using the System.DBNull class.
Example
[Visual Basic, C#] The following example creates a DB2®Parameter and sets some of its properties.
[Visual Basic]
Public Sub CreateDB2Parameter()
Dim myParameter As New DB2Parameter("Description", DB2Type.VarChar, 88)
myParameter.IsNullable = True
myParameter.Direction = ParameterDirection.Output
End Sub 'CreateDB2Parameter
[C#]
public void CreateDB2Parameter()
{
DB2Parameter myParameter = new DB2Parameter("Description", DB2Type.VarChar, 88);
myParameter.IsNullable = true;
myParameter.Direction = ParameterDirection.Output;
}