Oracle Objects for OLE C++ Class Library
Release 9.0.1

Part Number A90172-01

Home

Book List

Contents

Master Index

Feedback

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

All Rights Reserved.

Home

Book List

Contents