|Oracle® Objects for OLE C++ Class Library Developer's Guide
10g Release 1 (10.1)
Part Number B10119-01
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 (that is 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.
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 preceding 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.