Set the total number of columns found in the host file.
RETCODE bcp_columns(dbproc, host_colcount) DBPROCESS *dbproc; int host_colcount;
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 total number of columns in the host file. Even if you are preparing to bulk copy data from the host file to an Adaptive Server Enterprise table and do not intend to copy all columns in the host file, you must still set host_colcount to the total number of host file columns.
SUCCEED or FAIL.
This function sets the total number of columns found in a host file for use with bulk copy. This routine may be called only after bcp_init has been called with a valid file name.
You should call this routine only if you intend to use a host file format that differs from the default. The default host file format is described on the bcp_init reference page.
After calling bcp_columns, you must call bcp_colfmt host_colcount times, because you are defining a completely custom file format.