Oracle Objects for OLE C++ Class Library
Release 8.1.7

Part Number A85258-01

Library

Product

Contents

IsOpen Method

Applies To

OAdvise, OClient, OBinder, OConnection, OConnectionCollection, ODatabase, ODatabaseCollection, ODynaset, ODynasetMark, OField, OFieldCollection, OParameter, OParameterCollection, OSession, OSessionCollection, OAQ, OAQAgent, OAQMsg, OBfile, OBlob, OClob, OCollection, OException, OMDAttribute, OMetaData, OObject, ORef, OServer, OSnapshotID

Description

This method returns TRUE if the object is open.

Usage

virtual oboolean IsOpen(void) const

Remarks

See Close for a discussion of what it means for an object to be open or closed.

The most common use for IsOpen is to check an object after construction or after it has been returned from a routine. Closed objects indicate that there was some problem opening the object.

Return Value

TRUE if the object is open; FALSE otherwise.

Example

An example demonstrating when to use IsOpen:

// we construct and incorrectly open a database

ODatabase odb("p:ntserver", "user", "wrongpassword");

if (!odb.IsOpen())

{ // the database wasn't opened

// error processing

}

else

{ // the database is open

// use it

}


 
Oracle
Copyright copy; 1996-2000, Oracle Corporation.

All Rights Reserved.

Library

Product

Contents