Skip Headers
Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 2 (10.2)

Part Number B14308-01
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

GetParameters Method

Applies To

ODatabase

Description

This method returns an OParameterCollection object that contains the parameters of the database.

Usage

OParameterCollection GetParameters(void) const

Remarks

To add or remove parameters from a database, for use with dynasets on that database, you must use an OParameterCollection.

Return Value

An OConnectionCollection, which will be open on success, closed on failure.

Example

This example adds a parameter to an existing ODatabase (odb) and uses it to open an ODynaset:

// open a database

ODatabase odb("ExampleDB", "scott", "tiger");

// now add a parameter named ourdeptno to the database

OParameterCollection params = odb.GetParameters();

params.Add("ourdeptno ", 20, OPARAMETER_INVAR, OTYPE_NUMBER);

// now create and open a dynaset using that parameter

ODynaset dyn(odb, "select * from emp where deptno = :ourdeptno");