Try OpenEdge Now
skip to main content
Managed Adapters Guide
Database Managed Adapter : Working with the Database Adapter : Using stored procedures : Return values from stored procedures
Return values from stored procedures
This section explains various scenarios about return values from stored procedures.
*If a single cursor is returned from the stored procedure, then you need to map RETURN_CURSOR variable to an Object dataslot of class
The Database Adapter will check if the variable RETURN_CURSOR is mapped to an Object dataslot, and if it is mapped, then the Database Adapter will call getResultSet() on CallableStatement and will return the CachedRowSetImpl object to the mapped Object dataslot.
*If multiple cursors are returned from a stored procedure body, all of them can be retrieved from CallableStatement by calling getResultSet() and getMoreResults() methods in loop till getMoreResults() returns false. To retrieve all these ResultSets, you need to map the variable RETURN_CURSOR to a List dataslot.
The DBAdapter will retrieve all ResultSets, convert them to CachedRowSetImpl objects, populate the List with these objects and will return it for the List dataslot.