Oracle Objects for OLE C++ Class Library
Release 9.0.1

Part Number A90172-01

Home

Book List

Contents

Master Index

Feedback

Support for Multiple Cursor Return from a PL/SQL Procedure

Example

From OO4O 2.2 onwards, an OParameter object can also represent a PL/SQL cursor bind variable in a PL/SQL block. Under OO4O, this supports usage of PL/SQL procedures containing more than one cursor variable (i.e.
PlsqlOpen supports only one cursor variable). This OParameter class should be assigned to the type OTYPE_CURSOR in Add method of OParameterCollection and should be treated as output variable only. Upon output , ODynaset class will be obtained using the GetValue method of OParameter class. This ODynaset class represents read-only dynaset object. This Dynaset object can be treated as any other dynaset object.

Usage

oresult GetValue(ODynaset *odyn)

The dynaset options and cache parameters for the Dynaset object created from PL/SQL cursors can be set using
SetDynasetOption and SetDynasetCacheParams of the OParameter class. The above methods should be called before executing the PL/SQL procedure.

It is better to use
OSqlStmt class for executing PL/SQL procedures containing cursors. If the Refresh method on the OSqlStmt class results in modified PL/SQL cursors (depending upon cursor implementation under PL/SQL stored procedure), these modified cursors are automatically associated with the already existing dynaset object without creating a new dynaset object.

Attempting to use
SetSQL method on this ODynaset class results in error.

PL/SQL stored procedure containing cursors as table parameters are not supported.

You should call
Remove method on the parameter class. Doing this will help in cleaning the dynaset object and local temporary cache files.


 
Oracle
Copyright © 1996-2001, Oracle Corporation.

All Rights Reserved.

Home

Book List

Contents