Client-Library allows parameters to have a “null” value, that is, to contain no information, not even blanks or zeroes.
There are several rules for assigning null values to arguments:
For handles, an application assigns the following symbolic values to indicate a null:
CS_NULL_CONTEXT for context handles.
CS_NULL_CONHANDLE for connection handles.
CS_NULL_CMD for command handles.
For output arguments:
Arguments that return a single integer are never null.
Arguments that return longer values can be null. A null value is indicated by a separate argument, indicating that the argument of interest should be treated as null.
For arguments that have a corresponding length argument, assign the value CS_NULL_STRING to the corresponding length argument, if one is present, to indicate that the value of an argument should be treated as null.
For DATAFMT structures, you indicate a null field by
setting maxlength to zero.
For arguments that have NULL indicators, assign CS_PARAM_NULL to the indicator argument.
For all other variables, assign CS_UNUSED to indicate that the argument should be ignored.
The format field of the DATAFMT structure of ct_bind can be padded with either blanks or nulls. CS_FMT_PADNULL pads with binary zeroes; CS_FMT_PADBLANK pads with blanks.