bcp_exec

Description

Execute a bulk copy of data between a database table and a host file.

Syntax

RETCODE bcp_exec(dbproc, rows_copied)
 
DBPROCESS     *dbproc;
DBINT                 *rows_copied;

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.

rows_copied

A pointer to a DBINT. bcp_exec will fill this DBINT with the number of rows successfully copied. If set to NULL, this parameter will not be filled in by bcp_exec.

Returns

SUCCEED or FAIL.

bcp_exec returns SUCCEED if all rows are copied. If a partial or complete failure occurs, bcp_exec returns FAIL. Check the rows_copied parameter for the number of rows successfully copied.

Usage

See also

bcp_batch, bcp_bind, bcp_colfmt, bcp_collen, bcp_colptr, bcp_columns, bcp_control, bcp_done, bcp_init, bcp_sendrow