Skip Headers

Oracle® Objects for OLE Developer's Guide
10g Release 1 (10.1)

Part Number B10118-01
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Master Index
Master Index
Go to Feedback page

GetDatabaseFromPool Method

See Also

Applies To



This method returns the next available OraDatabase object from the pool.


GetDatabaseFromPool(long waitTime)


the number of milliseconds this call should wait for an object to be available, if the pool contains the maximum number of objects allowed and all are used.

To retrieve an OraDatabase object from the pool, the GetDatabaseFromPool method is called. This function returns a reference to an OraDatabase object. If the pool does not contain the maximum number of objects allowed, and all objects in the pool are used, then an additional OraDatabase object is created implicitly. In addition, if a pool item contains an OraDatabase object that has been timed out, then a new object is created and returned. The OraDatabase object obtained from the pool is then marked as in use and will be returned to the pool when the object is no longer referenced by the application.

Exceptions are raised by this call if:

· the Connection Pool does not exist

· the pool contains no objects

· a time out has occurred

The LastServerErr property of OraSession will contain the code for the specific cause of the exception.