Set the program variable data length for the current bulk copy into the database.
RETCODE bcp_collen(dbproc, varlen, table_column) DBPROCESS *dbproc; DBINT varlen; int table_column;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/Adaptive Server Enterprise process. It contains all the information that DB-Library uses to manage communications and data between the front end and Adaptive Server Enterprise.
The length of the program variable, which does not include the length of the length prefix or terminator. Setting varlen to 0 signifies that the data is NULL. Setting it to -1 signifies that the data is variable-length and that the length will be determined by the length prefix or terminator. If both a length prefix and a terminator exist, bcp will use the one that results in the smallest amount of data being copied.
The column in the Adaptive Server Enterprise table to which the data will be copied. Column numbers start at 1.
SUCCEED or FAIL.
The bcp_collen function allows you to change the program variable data length for a particular column while running a copy in through calls to bcp_bind.
Initially, the program variable data length is determined when bcp_bind is called. If the program variable data length changes between calls to bcp_sendrow, and no length prefix or terminator is being used, you may call bcp_collen to reset the length. The next call to bcp_sendrow will use the length you just set.
There must be a separate bcp_collen call for every column in the table whose data length you want to modify.