Unicode datatypes impact the processing of select statements in two ways when proxy tables are involved. The first involves the construction of SQL statements and parameters that are passed to remote servers; the second involves the conversion of data to Unicode when CIS fetches non-Unicode data.
A DML command involving a proxy table is handled using either TDS Language requests or TDS Cursor requests when interacting with the remote server. If a select statement contains predicates in the where clause that involve Unicode columns and constants, it will be necessary to handle the Unicode constants in one of two ways, depending on whether Language or Cursor commands will be used to process the statement:
TDS Language: Generate clear-text values that can be included in the language text buffer. This involves converting a constant Unicode value to clear text values that can be transmitted as part of a language request.
TDS Cursor: Generate Unicode parameters for Ct-Library cursor requests. Parameter values may be Unicode data, requiring CIS to use parameter types of CS_UNICHAR_TYPE.
CIS handles an insert command involving a proxy table using either TDS Language requests or TDS Dynamic requests.
If the insert command can be processed in quickpass mode, then TDS Language requests are used. If the command cannot be handled in quickpass mode, then the insert will be processed using TDS Dynamic requests.
In the case of language requests, the issues are the same as with select - Unicode values have to be converted to clear text form so they can be transmitted with the rest of the SQL statement. In the case of dynamic requests, Unicode data (along with all other data values) will be transmitted as parameters to the dynamic command. The receiving server is expected to process parameters of type CS_UNICHAR_TYPE.
The issues with update and delete commands are the same as for select and insert. Unicode values have to be converted either to clear text characters for transmission with the rest of the SQL statement, or they have to be converted into parameters of type CS_UNICHAR_TYPE.