1 Version 4.0 -- 5/1/89 bcp_columns
______________________________________________________________________
NAME: bcp_columns
FUNCTION:
Set the total number of columns found in the host file.
SYNTAX:
RETCODE bcp_columns(dbproc, host_colcount)
DBPROCESS *dbproc;
int host_colcount;
COMMENTS:
bcp_columns Version 4.0 -- 5/1/89 2
______________________________________________________________________
o 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.
o 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() manual page.
o After calling bcp_columns(), you must call bcp_colfmt()
host_colcount times, because you are defining a completely cus-
tom file format.
o For information on the bcp utility program, see its manual page
in the Commands Reference.
PARAMETERS:
dbproc - A pointer to the DBPROCESS structure that provides the
connection for a particular front-end/SQL Server process. It
3 Version 4.0 -- 5/1/89 bcp_columns
______________________________________________________________________
contains all the information that DB-Library uses to manage
communications and data between the front end and SQL Server.
host_colcount - The total number of columns in the host file.
Even if you are preparing to bulk copy data from the host
file to a SQL Server 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.
RETURNS:
SUCCEED or FAIL.
SEE ALSO:
bcp_colfmt, bcp_init