DB2Parameter.IsUnassigned Property

DB2®Parameter.IsUnassigned Property gets or sets a value indicating whether the parameter is treated as an unassigned value by the data server.

Namespace:
IBM.Data.DB2
Assembly:
IBM.Data.DB2 (in IBM.Data.DB2.dll)

Syntax


[Visual Basic]
Public Override Property IsUnassigned As Boolean
[C#]
public bool IsUnassigned {get; set;}
[C++]
public: __property bool get_IsUnassigned();
public: __property void set_IsUnassigned(bool);
[JScript]
public function get IsUnassigned() : Boolean;
public function set IsUnassigned(Boolean);

Property value

true if the parameter value is defined as unassigned by the data server. The default is false.

Remarks

DB2Command.EnableExtendedIndicators must be set to true in order to use this property.

If this property is set to true, the Value property is ignored.

Setting both IsDefault and IsUnassigned to true results in an InvalidOperationException

Example

[Visual Basic, C#] The following example creates a DB2Parameter and sets some of its properties.

[Visual Basic]
Public Sub CreateDB2Parameter()
    Dim myParameter As New DB2Parameter("Description", DB2Type.VarChar, 88)
    myParameter.IsUnassigned = True
End Sub 'CreateDB2Parameter

[C#]
public void CreateDB2Parameter()
 {
    DB2Parameter myParameter = new DB2Parameter("Description", DB2Type.VarChar, 88);
    myParameter.IsUnassigned = true;
 }