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

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 © 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