srv_sfield

Returns a field from an SRV_SERVER structure.


Important This Open Data Services function or macro is only supported in Microsoft® SQL Server™ version 7.0 for backward compatibility.


For more information about Open Data Services functions or macros supported for backward compatibility, see Open Data Services (Level 3).

Syntax

DBCHAR * srv_sfield (
SRV_SERVER * server,
int field,
int * len );

Arguments
server
Is a pointer to a SRV_SERVER structure. Use srv_init to get this pointer.
field
Specifies which server field to return. srv_sfield supports all configuration options supported by srv_config, as well as the following additional server fields:
SRV_SERVERNAME
The name of the Open Data Services application server. This name is set with srv_init.
SRV_VERSION
Returns a string representing the version of Open Data Services in use. The version string has the format xx.xx.xx.xx (for example, 6.00.01.02). The first two sets of digits represent the internal version number. The final set of digits is a level identifier. Applications can check the version of the ODS Library (Opends60.dll) at run time, to ensure that its version information is equal to or later than the version used to develop the application.
len
Specifies a pointer to an integer variable that contains the length of the value for field. If len is NULL, the length of the string is not returned.
Returns

A DBCHAR pointer to a null-terminated string containing the field value. The string length is returned in len. If the field is empty, a valid DBCHAR pointer to an empty string is returned and len is set to 0. If the field is unknown, NULL is returned and len is set to -1.

Remarks

This function returns a pointer to a null-terminated string containing the current value for the field in the server structure.

See Also
srv_config srv_log
srv_getserver srv_pfield
srv_init  

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.