Oracle® Objects for OLE C++ Class Library Developer's Guide 10g Release 2 (10.2) Part Number B14308-01 |
|
Applies To
Description
This method returns TRUE if value of the variable is NULL.
Usage
oboolean IsNull(void) const
Remarks
NULL is a possible value for Oracle database fields. This database NULL is different from a C++ NULL. Database NULLs mean "no value set".
An OValue can contain a value of NULL. This routine tells you whether the OValue contains a NULL. Note that if you cast a NULL to (for example) an integer, you get a result of 0.
Return Value
TRUE if the value is NULL; FALSE otherwise.
Example
NULL and not-NULL values in an OValue variable:
// construct an OValue with a value of 5 OValue val(5); // is that NULL? oboolean isnull = val.IsNull(); // isnull is FALSE // make it NULL val.Clear(); isnull = val.IsNull(); // now isnull is TRUE