Oracle Objects for OLE C++ Class Library
Release 9.0.1

Part Number A90172-01

Home

Book List

Contents

Master Index

Feedback

Remove Method

Applies To

OParameterCollection

Description

This method removes a parameter from a database.

Usage

oresult Remove(int index) const

oresult Remove(const char *pname) const

Arguments

index
An index from 0 to OParameterCollection.GetCount()-1.
pname
The name of the parameter, as stated when the parameter was created with Add.
Remarks

Parameters are attached to a database using OParameterCollection::Add. Once attached they will stay in existence. When you no longer need a parameter you can remove it using the Remove method. This will reduce overhead in the processing of SQL statements.

For an OParameter class of OTYPE_CURSOR, this method destroys the dynaset object associated with the cursor and clears the local cache temporary files.

Return Value

An oresult indicating whether the operation succeeded (OSUCCESS) or not (OFAILURE).

Example

Adding and removing a parameter

// open a database

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

OParameterCollection pcoll = odb.GetParameters();

// add a parameter

pcoll.Add("param1", 34, OPARAMETER_INVAR, OTYPE_NUMBER);

// now remove it

pcoll.Remove("param1");


 
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents