Comparing DB-Library and Client-Library cursors

DB-Library supports client-side cursors, while Client-Library supports server-side cursors:

Table 6-1 outlines some key differences between DB-Library and Client-Library cursors:

Table 6-1: Differences between DB-Library cursors and Client-Library cursors

DB-Library cursors

Client-Library cursors

Cursor row position is defined by the client.

Cursor row position is defined by the server.

Can define optimistic concurrency control.

Cannot define optimistic concurrency control.

Can fetch backwards (if scrollopt is CUR_KEYSET or CUR_DYNAMIC in the call to dbcursoropen).

With scrollable cursors, it is possible to fetch data in any of these fetch orientations:

  • ABSOLUTE

  • RELATIVE

  • FIRST

  • LAST

  • PREVIOUS

Memory requirements depend on the size of the fetch buffer specified during dbcursoropen.

Memory requirements depend on the cursor-rows setting and whether the application sends new commands on the connection while the cursor is open.

You cannot access an Open Server application unless the application installs the required DB-Library stored procedures.

You can access a System 10 and later Open Server application that is coded to support cursors.

Slower performance.

Faster performance.

Multiple cursors per DBPROCESS possible.

Multiple cursors per CS_CONNECTION possible.

Only one cursor per CS_COMMAND structure.