Values for CURSOR_STATUS

The CURSOR_STATUS field of the CURSOR_DESC structure is a bit mask that can take any combination of the values described in Table 2-6.

Table 2-6: Values for CURSOR_STATUS (CURSOR_DESC)

CURSOR_COMMAND value

Meaning

TDS_CURSTAT_DECLARED

The cursor is declared. This status is reset after the next cursor command is processed.

TDS_CURSTAT_OPEN

The cursor is open.

TDS_CURSTAT_ROWCNT

The cursor specified the number of rows that should be returned for the TDS_CURSOR_FETCH command.

TDS_CURSTAT_RDONLY

The cursor is read only; it cannot be updated. The Open ServerConnect application should return an error to the client if TDS_CURSOR_UPDATE or TDS_CURSOR_DELETE is received for this cursor.

TDS_CURSTAT_UPDATABLE

The cursor can be updated.

TDS_CURSTAT_CLOSED

The cursor is closed, but not deallocated. It can be opened again later. This status is also set upon declaration of a cursor. Open ServerConnect clears it when a TDS_CURSOR_OPEN is received and resets it when a TDS_CURSOR_CLOSE is received.

TDS_CURSTAT_DEALLOC

The cursor is closed and deallocated. No other status flags should be set at this time.