SRV_TDSVERSION

Determines the tabular data stream (TDS) version being used in the client connection for the SRV_PROC structure.

Syntax

int SRV_TDSVERSION ( SRV_PROC * srvproc );

where

srvproc
Is a pointer to the SRV_PROC structure that is the handle for a particular client connection (in this case, the handle for which the TDS version is requested).

Returns

The TDS version used by the specified client connection. The following table lists the TDS version constants that can be returned:

Constant Version
srv_tds_4_0 The version used by SQL Server 4.2 and by Open Data Services version 4.2.
srv_tds_6_0 The version used by SQL Server 6.0 and by Open Data Services version 6.0.

Remarks

The macro SRV_TDSVERSION returns more useful information than the srv_pfield function. Using SRV_TDSVERSION you can determine if the client connection supports SRVDECIMAL and SRVNUMERIC data. If SRV_TDSVERSION returns SRV_TDS_6_0 then the client supports SRVDECIMAL and SRVNUMERIC data. If SRV_TDSVERSION returns SRV_TDS_4_0 then the client does not support SRVDECIMAL and SRVNUMERIC data, and the Open Data Services application should convert SRVDECIMAL and SRVNUMERIC data into SRVFLT8 before sending it to the client.

See Also

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