Sets a variable to NULL. The variable can be any datatype except for an array, structure, or autoinstantiated object.
Syntax
SetNull ( anyvariable )
Argument Description
anyvariable The variable you want to set to NULL
Return value
Integer. Returns 1 if it succeeds and -1 if an error occurs. If any argument's value is NULL, SetNull returns NULL.
Usage
Use SetNull to set a variable to NULL before writing it to the database. Note that PowerBuilder does not initialize variables to NULL; it initializes variables to the default initial value for the datatype unless you specify a value when you declare the variable.
If you assign a value to a variable whose datatype is Any and then set the variable to NULL, the datatype of the NULL value is still the datatype of the assigned value. You cannot untype an Any variable with the SetNull function.