Open Client includes three binary types, CS_BINARY, CS_LONGBINARY, and CS_VARBINARY:
CS_BINARY corresponds to the Adaptive Server Enterprise types binary and varbinary. That is, Client-Library interprets both the server binary and varbinary types as CS_BINARY. For example, ct_describe returns CS_BINARY_TYPE when describing a result column that has the server datatype varbinary.
CS_LONGBINARY does not correspond to any Adaptive Server Enterprise type, but some Open Server applications may support CS_LONGBINARY. An application can call ct_capability and check the CS_DATA_LBIN capability to determine whether an Open Server connection supports CS_LONGBINARY. If it does, then ct_describe can return CS_LONGBINARY when describing a result data item. A CS_LONGBINARY value has a maximum length of 2,147,483,647 bytes.
CS_VARBINARY does not correspond to any Adaptive Server Enterprise type, and Open Client routines do not return CS_VARBINARY_TYPE. CS_VARBINARY is a structure that holds a byte array and its length:
typedef struct _cs_varybin
{
CS_SMALLINT len;
CS_BYTE array[CS_MAX_CHAR];
} CS_VARBINARY;
CS_VARBINARY is provided so that programmers can write non-C programming language veneers to be written for Open Client. Typical client applications do not use CS_VARBINARY.