Oracle Objects for OLE C++ Class Library
Release 9.2

Part Number A95896-01
Go To Documentation Library
Home
Go To Product List
Book List
Go To Table Of Contents
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
Description
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 © 1998, 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