7.3 Ref Cursor Support

Table of Contents Previous Next


7 Open Client Library : 7.3 Ref Cursor Support

OCL also supports the SQLT_RSET data type.
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:

7 Open Client Library : 7.3 Ref Cursor Support

Table of Contents Previous Next