srv_cursor_props

Description

Retrieve or set information about the current cursor.

Syntax

CS_RETCODE srv_cursor_props(spp, cmd, cdp)
SRV_PROC            *spp;
CS_INT                   cmd;
SRV_CURDESC    *cdp;

Parameters

spp

A pointer to an internal thread control structure.

cmd

Indicates whether srv_cursor_props sends cursor information to the client or retrieves cursor information from the client. The following table describes the legal values for cmd:

Table 3-27: Values for cmd (srv_cursor_props)

Value

Description

CS_SET

srv_cursor_props sends information about the current cursor to the client.

CS_GET

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

cdp

A pointer to a SRV_CURDESC structure. When the application is setting cursor information, the SRV_CURDESC structure describes the current cursor. When the application is retrieving information, Open Server updates the SRV_CURDESC 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_CURDESC structure”.

Returns

Table 3-28: Return values (srv_cursor_props)

Returns

To indicate

CS_SUCCEED

The routine completed successfully.

CS_FAIL

The routine failed.

Examples

Example 1

#include          <ospublic.h>
/*
 ** Local Prototype.
 */
extern CS_RETCODE     ex_srv_cursor_props PROTOTYPE((
CS_VOID               *spp
));
/* 
 ** EX_SRV_CURSOR_PROPS
**
**     Example routine to retrieve information on the current
 **     cursor.
** Arguments:
**  spp  Apointer to an internal control structure.
**
** Returns:
**
**  CS_SUCCEED     Cursor information was retrieved successfully.
**  CS_FAIL        An error was detected.
*/
CS_RETCODE         ex_srv_cursor_props(spp)
SRV_PROC           *spp;
{
     SRV_CURDESC   curdesc;

     if(srv_cursor_props(spp, CS_GET, &curdesc) == CS_FAIL)
     {
          return(CS_FAIL);
     }
     return(CS_SUCCEED);
}

Usage

See also

srv_bind, srv_descfmt, srv_numparams, srv_xferdata, “Cursors”