Oracle Objects for OLE C++ Class Library
Release 9.0.1

Part Number A90172-01

Home

Book List

Contents

Master Index

Feedback

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 © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents