CIS handles large column values when proxy tables are involved in DML operations. CIS handles DML using one of several strategies:
TDS Language commands - if the entire SQL statement can be forwarded to a remote server, then CIS does so using TDS Language commands generated by Ct-Library - ct_command (CS_LANG_CMD).
The text of the language buffer may contain data for long char or binary values that exceeds 255 bytes, and remote servers must handle parsing of these command buffers.
TDS Dynamic commands - if CIS cannot forward the entire SQL statement to a remote server (i.e. CIS is forced to provide functional compensation for the statement), then an insert, update or delete may be handled by using TDS Dynamic commands, with parameters as needed, using the Ct-Library function ct_dynamic (CS_PREPARE_CMD, CS_EXECUTE_CMD, CS_DEALLOC_CMD).
The parameters for the dynamic command may be CS_LONGCHAR_TYPE or CS_LONGBINARY_TYPE.
TDS Cursor commands - Ct-Library cursor operations can be used to handle proxy table operations for select, update and delete if functional compensation has to be performed. For example, if updating a proxy table and there are multiple tables in the from clause, CIS may have to fetch rows from multiple data sources, and for each qualifying row, apply the update to the target table. In this case, CIS uses ct_cursor ({CS_DECLARE_CMD, CS_OPEN_CMD, CS_CURSOR_UPDATE_CMD, CS_CLOSE_CMD, CS_DEALLOC_CMD}).
After a cursor is prepared, parameters are specified. These parameters may now include those of type CS_LONGCHAR or CS_LONGBINARY.
Bulk insert commands - when performing a select/into operation, if the target server supports the bulk interface (only true of remote ASE’s), then the remote server must be prepared to handle char/binary values > 255 (via CS_LONGCHAR, CS_LONGBINARY values).
Columns from remote servers may be returned to CIS as type CS_LONGCHAR_TYPE or CS_LONGBINARY_TYPE.