Flags a field data member of the recordset as Null (specifically having no value) or as non-Null.
When you add a new record to a recordset, all field data members are initially set to a Null value and flagged as "dirty" (changed). When you retrieve a record from a data source, its columns either already have values or are Null.
Do not call this member function on recordsets that are using bulk row fetching. If you have implemented bulk row fetching, calling SetFieldNull results in a failed assertion. For more information about bulk row fetching, see the article Recordset: Fetching Records in Bulk (ODBC).
If you specifically wish to designate a field of the current record as not having a value, call SetFieldNull with bNull set to TRUE to flag it as Null. If a field was previously marked Null and you now want to give it a value, simply set its new value. You do not have to remove the Null flag with SetFieldNull. To determine whether the field is allowed to be Null, call IsFieldNullable.
Using NULL for the first argument of the function will apply the function only to outputColumn fields, not param fields. For instance, the call
will set only outputColumn fields to NULL; param fields will be unaffected.
To work on param fields, you must supply the actual address of the individual param you want to work on, such as:
This means you cannot set all param fields to NULL, as you can with outputColumn fields.
When setting parameters to Null, a call to SetFieldNull before the recordset is opened results in an assertion. In this case, call SetParamNull.
SetFieldNull is implemented through DoFieldExchange.