Oracle Objects for OLE C++ Class Library
Release 9.2

Part Number A95896-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback

operator long

Applies To

OField

OParameter

OValue

Description

This method returns the object's value as a long.

Usage

operator long() const

Remarks

This method hands the value of the object back to the caller as a long. If the object's current value is not a long, the method attempts to convert the value. This can fail, resulting in the return of the value 0.

Return Value

The value of the field as a long; 0 on failure.

Example

Look for the employee with a certain employee ID:

// open the ODatabase

ODatabase odb("ExampleDB", "scott", "tiger")

// open the dynaset

ODynaset odyn(odb, "select * from emp");

// get a field on the id

OField enof = odyn.GetField("empno");

// now look for the id we want

while (!odyn.IsEOF())

{

// we'll examine the value of the id field in this record simply

// by casting the enof OField variable

if ((long) enof == targetid)

break;

}


 
Oracle
Copyright © 1998, 2002 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
Contents

Master Index

Feedback