Export (0) Print
Expand All

bcp_columns

SQL Server 2000

Sets the total number of columns found in the user file for use with a bulk copy into or out of Microsoft® SQL Server™ 2000.

Syntax

RETCODE bcp_columns (
PDBPROCESS
dbproc,
INT file_colcount );

Arguments

dbproc

Is the DBPROCESS structure that is the handle for a particular workstation orSQL Server process. It contains all the information that DB-Library uses to manage communications and data between the workstation and SQL Server.

file_colcount

Is the total number of columns in the user file. Even if you are preparing to bulk copy data from the user file to a SQL Server table and do not intend to copy all columns in the user file, you must still set file_colcount to the total number of user-file columns.

Returns

SUCCEED or FAIL.

Remarks

This function can be called only after bcp_init has been called with a valid file name.

You should call this function only if you intend to use a user-file format that differs from the default. For a description of the default user-file format, see bcp_init.

After calling bcp_columns, you must call bcp_colfmt file_colcount times because you are defining a completely custom file format.

See Also

bcp_colfmt

bcp_init

Show:
© 2014 Microsoft