bcp_control

Description

Change various control parameter default settings.

Syntax

RETCODE bcp_control(dbproc, field, value)
 
DBPROCESS     *dbproc;
int                         field;
DBINT                   value;

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.

field

A control-parameter identifier consisting of one of the following symbolic values:

Field

Description

BCPMAXERRS

The number of errors allowed before giving up. The default is 10.

BCPFIRST

The first row to copy. The default is 1. A value of less than 1 resets this field to its default value of 1.

BCPLAST

The last row to copy. The default is to copy all rows. A value of less than 1 resets this field to its default value.

BCPBATCH

The number of rows per batch. The default is 0, which means that the entire bulk copy will be done in one batch. This field is only meaningful when copying from a host file into Adaptive Server.

value

The value to change the corresponding control parameter to.

Returns

SUCCEED or FAIL.

Usage

See also

bcp_batch, bcp_bind, bcp_colfmt, bcp_collen, bcp_colptr, bcp_columns, bcp_done, bcp_exec, bcp_init