srv_sfield
Returns a field from an SRV_SERVER structure.
Syntax
DBCHAR * srv_sfield (
SRV_SERVER * server,
int field,
int * len );
where
-
server
-
Is a pointer to an 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. srv_sfield also supports the following additional server fields:
-
SRV_SERVERNAME
-
The name of the Open Data Services server 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 greater than the version used to develop the application.
For more information about supported configuration options, see srv_config.
-
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
|
|
|
|
|
|
| This entry |
For information about |
| srv_config |
Setting Open Data Services configuration parameters |
| SRV_GETSERVER |
Accessing a client's Open Data Services data structure |
| srv_init |
Initializing an Open Data Services server application |
| srv_log |
Writing a message to the Open Data Services log file |
| srv_pfield |
Returning a field from an SRV_PROC structure |
| srv_symbol |
Converting an Open Data Services token value to a readable string |