srv_cursor_props2

Description

Retrieve or set information about the current cursor.

NoteFor version 15.0 and later applications that support scrollable cursors on Open Server, use the SRV_CURDESC2 structure and srv_cursor_props2 routine. For pre-15.0 applications, use the SRV_CURDESC structure and srv_cursor_props routine.

Syntax

CS_RETCODE srv_cursor_props2(spp, cmd, cdp)
SRV_PROC            *spp;
CS_INT                   cmd;
SRV_CURDESC2  *cdp;

Parameters

spp

A pointer to an internal thread control structure.

cmd

Indicates whether srv_cursor_props2 sends cursor information to the client or retrieves cursor information from the client.

Table 3-29: Values for cmd (srv_cursor_props2)

Value

Description

CS_SET

srv_cursor_props2 sends information about the current cursor to the client.

CS_GET

srv_cursor_props2 retrieves information about the current cursor command from the client.

cdp

A pointer to a SRV_CURDESC2 structure. When the application is setting cursor information, the SRV_CURDESC2 structure describes the current cursor. When the application is retrieving information, Open Server updates the SRV_CURDESC2 structure with information about the current cursor. Various fields are set or filled in at various times, depending on the current cursor command. For an explanation of each field in cdp and how and when they are filled in, see “SRV_CURDESC2 structure”.

Returns

Table 3-30: Return values (srv_cursor_props2)

Returns

To indicate

CS_SUCCEED

The routine completed successfully.

CS_FAIL

The routine failed.

Usage

See the Usage section of the srv_cursor_props routine.

See also

srv_bind, srv_descfmt, srv_numparams, srv_xferdata, “Cursors”