Oracle Objects for OLE
Release 9.2

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

Master Index

Feedback

CreateDatabasePool Method

See Also

Applies To

OraSession

Description

This method creates a pool of OraDatabase objects. Only one pool can be created per OraSession.

Usage

CreateDatabasePool (long initialSize, long maxSize, long timeoutValue, BSTR connectString, BSTR usernamePassword, long options)

Arguments
Description
initialSize
the Initial Size of the pool
maxSize
the maximum size to which the pool can grow
timeoutValue
if an OraDatabase object in the pool is idle for the timeoutValue value specified, the database connection that it contains will be disconnected. The connection will be reopened if the pool item is used again. This value is in seconds.
connectString, usernamePassword, and options are the same parameters used in the OpenDatabase method of OraSession.

Remarks

The OpenDatabase method of the OraSession object is used to establish a connection to an Oracle database. This method returns a reference to the OraDatabase object which is then used for executing SQL statements and PL/SQL blocks. The Connection Pool in OO4O is a pool of OraDatabase objects. The pool is created by invoking the CreateDatabasePool method of the OraSession interface.

Exceptions are raised by this call if:

· a pool already exists

· an error occurs in creating a connection to the Oracle database

· invalid values for arguments are passed (i.e. initialSize > maxSize)

The LastServerErr property of OraSession will contain the code for the specific cause of the exception resulting from an Oracle database error.

One possible connection error that could be returned is:

ORA-28001 "the password has expired"

The user can change the password using the ChangePassword method.


 
Oracle
Copyright © 1994, 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