The SQLCommandIsNullValue function returns TRUE if a column value is NULL. The column value is taken from the current row of the result set of an SQLCommand Data Object. This function should only be called after SQLCommandFetchRow() has returned TRUE.
Informal Syntax:
SQLCommandIsNullValue( CommandID, ColumnIndex )
Formal Syntax:
SQLCommandIsNullValue( CommandID:=Expression, ColumnIndex:=Expression )
The SQLCommandIsNullValue Function has these parameters:
Parameter | Type | Description |
---|---|---|
CommandID | UDINT | The identifier of the SQLCommand Data Object. |
ColumnIndex | UDINT | The zero based column index of the column to test. |
The SQLCommandIsNullValue function returns a BOOL value indicating whether the column value is NULL.
The meaning of the return value depends on the type of SQL Command executed:
SQL Command | Return Value |
---|---|
SELECT Statement | TRUE if the column value is NULL. FALSE if the column value is not NULL. |
INSERT Statement | No value returned. The function generates a runtime error |
UPDATE Statement | No value returned. The function generates a runtime error |
DELETE Statement | No value returned. The function generates a runtime error |
The function should only be called when:
For examples see the Examples section of the SQLCommandFromTagDB Function Block.
The SQLCommandIsNullValue Function is an extension to the IEC 61131-3 standard.
To learn how to use the SQLCommand data object.
To learn how to use data objects in IEC 61131-3 code.
To learn how IEC 61131-3 is used in Fernhill SCADA.
For the meaning of terms used in Fernhill SCADA.