Cursor results should be processed by calling ct_results in a standard loop structure (see “Structure of the basic loop”). Cursor rows are available when ct_results returns with result_type equal to CS_CURSOR_RESULT. Cursor rows are handled like any other fetchable result set. (See “Processing cursor results”.)
The difference from other result types is that the application can issue new commands while fetching cursor rows. These commands can be either of two types:
Nested cursor commands – cursor-close, cursor-delete, or cursor-update commands executed using the command structure that controls the cursor, or
All other commands – any command executed using a separate command structure.