Close cursor or deallocate cursor

When the cursor command is TDS_CURSOR_CLOSE, the client is requesting to close a cursor. This can be a request to both close and deallocate the cursor, or to close it only.

When the cursor command is TDS_CURSOR_DEALLOC, the client is requesting to deallocate a cursor.

In response to either command, the Gateway-Library transaction calls the following functions:

Function

Action

TDCURPRO

Determine:

  • The type of cursor command, and

  • Whether the cursor should also be deallocated.

[application logic]

[Close the cursor]

TDCURPRO

Send the cursor status to the client.

TDSNDDON

Send the reply to the client.

TDGETREQ

Retrieve the next part of the cursor request.