Skip Headers

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

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

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");