CS_TDS_VERSION defines the version of the Tabular Data Stream (TDS) protocol that the connection is using.
Because CS_TDS_VERSION is a negotiated login property, its value may change during the login process. An application sets CS_TDS_VERSION to request a TDS level before calling ct_connect. When ct_connect creates the connection, if the server cannot provide the requested TDS version, a new (lower) TDS version is negotiated. An application retrieves the value of CS_TDS_VERSION after a connection is established to determine the actual version of TDS in use.
Table 2-30 lists the symbolic values of CS_TDS_VERSION. The supported features for the earlier versions have been carried forward for the later versions:
Symbolic value |
Meaning |
Added supported features |
---|---|---|
CS_TDS_40 |
4.0 TDS |
Browse mode, text and image handling, remote procedure calls, bulk copy |
CS_TDS_42 |
4.2 TDS |
Internationalization. |
CS_TDS_46 |
4.6 TDS |
Registered procedures, TDS passthrough, negotiable TDS packet size, multibyte character sets |
CS_TDS_50 |
5.0 TDS |
Cursors |
If not otherwise set, CS_TDS_VERSION defaults to a value based on the CS_VERSION level that an application requested through ct_init.
A connection’s CS_TDS_VERSION level will never be higher than the default TDS level associated with its parent context’s CS_VERSION level.
For example, 5.0 is the default TDS level associated with a version level of CS_VERSION_110 and later. If an application calls ct_init with version as CS_VERSION_110 for a context, all connections created within that context are restricted to CS_TDS_VERSION levels of 5.0 or lower.
If an application sets the CS_TDS_VERSION property, Client-Library overwrites existing capability values with default capability values corresponding to the new TDS version. For this reason, an application should set CS_TDS_VERSION before setting any capabilities for a connection.