Testing for DBNull in a C ++ ADO record set includes checking a fieldpointer->Value property of type VARIANT . To check the values โโof the null variant, you check the vt field, which is equal to VT_NULL for null values.
So, to check DBNull, check fieldpointer->Value.vt == VT_NULL
source share