When you
write to the OLE DB interface, use the IRowset::GetData method to
test for missing numeric values in a data set. If a numeric field
value in a column in the client's row data buffer is missing, then
the dwStatus value is set to DBSTATUS_S_ISNULL. If the client wishes
to receive the appropriate SAS missing value indicator, then the client
should set the DBPROP_SAS_MISSING_VALUES property to
True
. The possible missing value indicator values
are as follows:
-
-
NumericMissingUnderscore(16)
-
-
-
-
If a character
field value in a column in the client's row data buffer is missing,
then the dwLength value is set to zero (0) or the bData value contains
only spaces.
Note: Schema rowsets
will return missing character values as NULL values in order to provide
greater interoperability with third-party clients such as Microsoft
Excel. The dwStatus flag will also be set to DBSTATUS_S_ISNULL for
missing character values in the rowsets. Always check the column type
to determine whether the value is a missing character or a missing
numeric.
The representation
of missing character values depends on whether blank padding is preserved.
In the case of OLE DB, the DBPROP_SAS_BLANKPADDING property controls
this behavior.
-
If blank padding is not preserved
(DBPROP_SAS_BLANKPADDING is set to VARIANT_FALSE), then the dwLength
member of the column in the client's row data buffer will be set to
zero (which represents the width of the empty column).
-
If blank padding is preserved (DBPROP_SAS_BLANKPADDING
is set to VARIANT_TRUE), then the bData member of the column in the
client's row data buffer will be a string of spaces.