select, insert, update, and delete statements

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 Component Integration Services 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, the Unicode constants musts be handled in one of two ways, depending on whether language or cursor commands are used to process the statement:

  1. 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.

  2. TDS cursor – generate Unicode parameters for CT-Library cursor requests. Parameter values may be Unicode data, requiring Component Integration Services to use parameter types of CS_UNICHAR_TYPE.

Component Integration Services 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, the insert is processed using TDS Dynamic requests.

In language requests, the issues are the same as with select — Unicode values must be converted to clear-text form so they can be transmitted with the rest of the SQL statement. In dynamic requests, Unicode data (along with all other data values) is 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 must be converted either to clear-text characters for transmission with the rest of the SQL statement, or they must be converted into parameters of type CS_UNICHAR_TYPE.