bcp_collen

Description

Set the program variable data length for the current bulk copy into the database.

Syntax

RETCODE bcp_collen(dbproc, varlen, table_column)
 
DBPROCESS      *dbproc;
DBINT                  varlen;
int                         table_column;

Parameters

dbproc

A pointer to the DBPROCESS structure that provides the connection for a particular front-end/Adaptive Server process. It contains all the information that DB-Library uses to manage communications and data between the front end and Adaptive Server.

varlen

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.

table_column

The column in the Adaptive Server table to which the data will be copied. Column numbers start at 1.

Returns

SUCCEED or FAIL.

Usage

See also

bcp_bind, bcp_colptr, bcp_sendrow