srv_symbol

Converts an Open Data Services token value to a readable string.

Syntax

DBCHAR * srv_symbol (
int
type,
int
symbol,
int *
len );

where

type
Is the type of the symbol token. The following token type values are valid:
Value (type) Token (symbol)
SRV_DATATYPE An Open Data Services datatype token returned by the Open Data Services function srv_paramtype (SRVCHAR for example) or a DB-Library datatype token returned by functions like dbcoltype (SQLCHAR for example).
SRV_EVENT An event token passed to srv_handle (SRV_CONNECT for example).
SRV_DONE A "done" status token passed to srv_senddone (SRV_DONE_FINAL for example).
SRV_ERROR An error-severity token passed to the Open Data Services application's error handler installed by srv_errhandle (SRV_INFO for example).

symbol
Is the actual Open Data Services or DB-Library token value.
len
Is a pointer to an integer variable that contains the length of the returned string.

Returns

A pointer to a null-terminated character string that is a readable translation of an Open Data Services token value. If type or symbol is unknown, the function returns NULL and sets len to -1. The returned pointer points to space that is never overwritten, so it is safe to call this function more than once in the same statement. To free memory allocated by a call to srv_symbol, you must call the Windows NT function LocalFree.

Remarks

This function returns a pointer to a null-terminated string that describes an Open Data Services token value.

See Also

This entry For information about
srv_pfield Returning a field from an SRV_PROC structure
srv_sfield Returning a field from an SRV_SERVER structure