Skip Headers
Oracle® Objects for OLE Developer's Guide
11g Release 2 (11.2) for Microsoft Windows

Part Number E17727-03
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

CreateDatabasePool Method

Applies To

OraSession Object

Description

Creates a pool of OraDatabase objects. Only one pool can be created for each OraSession object.

Usage

CreateDatabasePool (long initialSize, long maxSize, long timeoutValue, BSTR database_name, BSTR connect_string, long options)

Arguments

The arguments for the method are:

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 is disconnected. The connection is reopened if the pool item is used again. This value is in seconds.
database_name The Oracle network specifier used when connecting the data control to a database.
connectString The user name and password to be used when connecting to an Oracle database.
options A bit flag word used to set the optional modes of the database. If options = 0, the default mode settings apply. "Constants" shows the available modes.

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:

The LastServerErr property of the OraSession object contains 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.