Oracle Objects for OLE C++ Class Library
Release 8.1.7

Part Number A85258-01

Library

Product

Contents

IsNull Method

Applies To

OValue

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


 
Oracle
Copyright copy; 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents