2.5 Ref Cursor Support

Table of Contents Previous Next


2 Open Client Library : 2.5 Ref Cursor Support

The Advanced Server Open Client Library supports the use of REF CURSOR's as OUT parameters in PL/SQL procedures that are compatible with Oracle. Support is provided through the following API's:
The following example demonstrates how to invoke a stored procedure that opens a cursor and returns a REF CURSOR as an output parameter. The code sample assumes that a PL/SQL procedure named openCursor (with an OUT parameter of type REF CURSOR) has been created on the database server, and that the required handles have been allocated:
Bind the PL/SQL openCursor OUT parameter:
Use the stmtOpenRefCursor statement handle to call the openCursor procedure:
At this point, the stmtUseRefCursor statement handle contains the reference to the cursor. To obtain the information, define output variables for the ref cursor:

2 Open Client Library : 2.5 Ref Cursor Support

Table of Contents Previous Next