Static functions internal to the bcp library.
More...
|
static RETCODE | _bcp_exec_in (DBPROCESS *dbproc, DBINT *rows_copied) |
|
static RETCODE | _bcp_exec_out (DBPROCESS *dbproc, DBINT *rows_copied) |
|
static char * | _bcp_fgets (char *buffer, int size, FILE *f) |
|
static void | _bcp_free_columns (DBPROCESS *dbproc) |
|
static void | _bcp_free_storage (DBPROCESS *dbproc) |
|
static TDSRET | _bcp_get_col_data (TDSBCPINFO *bcpinfo, TDSCOLUMN *bindcol, int offset TDS_UNUSED) |
| For a bcp in from program variables, get the data from the host variable.
|
|
static int | _bcp_get_term_var (const BYTE *pdata, const BYTE *term, int term_len) |
| Get the data for bcp-in from program variables, where the program data have been identified as character terminated,
This is a low-level, internal function.
|
|
static STATUS | _bcp_read_hostfile (DBPROCESS *dbproc, FILE *hostfile, bool *row_error, bool skip) |
|
static int | _bcp_readfmt_colinfo (DBPROCESS *dbproc, char *buf, BCP_HOSTCOLINFO *ci) |
|
static int | rtrim (char *str, int len) |
| trim a string of trailing blanks
|
|
Static functions internal to the bcp library.
◆ _bcp_exec_in()
static RETCODE _bcp_exec_in |
( |
DBPROCESS * |
dbproc, |
|
|
DBINT * |
rows_copied |
|
) |
| |
|
static |
- Parameters
-
dbproc | contains all information needed by db-lib to manage communications with the server. |
rows_copied | |
- Returns
- SUCCEED or FAIL.
- See also
- BCP_SETL(), bcp_batch(), bcp_bind(), bcp_colfmt(), bcp_colfmt_ps(), bcp_collen(), bcp_colptr(), bcp_columns(), bcp_control(), bcp_done(), bcp_exec(), bcp_getl(), bcp_init(), bcp_moretext(), bcp_options(), bcp_readfmt(), bcp_sendrow()
◆ _bcp_exec_out()
static RETCODE _bcp_exec_out |
( |
DBPROCESS * |
dbproc, |
|
|
DBINT * |
rows_copied |
|
) |
| |
|
static |
- Parameters
-
dbproc | contains all information needed by db-lib to manage communications with the server. |
rows_copied | |
- Returns
- SUCCEED or FAIL.
- See also
- BCP_SETL(), bcp_batch(), bcp_bind(), bcp_colfmt(), bcp_colfmt_ps(), bcp_collen(), bcp_colptr(), bcp_columns(), bcp_control(), bcp_done(), bcp_exec(), bcp_getl(), bcp_init(), bcp_moretext(), bcp_options(), bcp_readfmt(), bcp_sendrow()
◆ _bcp_fgets()
static char * _bcp_fgets |
( |
char * |
buffer, |
|
|
int |
size, |
|
|
FILE * |
f |
|
) |
| |
|
static |
- Parameters
-
- Returns
- SUCCEED or FAIL.
- See also
- BCP_SETL(), bcp_batch(), bcp_bind(), bcp_colfmt(), bcp_colfmt_ps(), bcp_collen(), bcp_colptr(), bcp_columns(), bcp_control(), bcp_done(), bcp_exec(), bcp_getl(), bcp_init(), bcp_moretext(), bcp_options(), bcp_readfmt(), bcp_sendrow()
◆ _bcp_free_columns()
static void _bcp_free_columns |
( |
DBPROCESS * |
dbproc | ) |
|
|
static |
- Parameters
-
dbproc | contains all information needed by db-lib to manage communications with the server. |
◆ _bcp_free_storage()
static void _bcp_free_storage |
( |
DBPROCESS * |
dbproc | ) |
|
|
static |
◆ _bcp_get_col_data()
static TDSRET _bcp_get_col_data |
( |
TDSBCPINFO * |
bcpinfo, |
|
|
TDSCOLUMN * |
bindcol, |
|
|
int offset |
TDS_UNUSED |
|
) |
| |
|
static |
For a bcp in from program variables, get the data from the host variable.
- Parameters
-
dbproc | contains all information needed by db-lib to manage communications with the server. |
bindcol | |
- Returns
- TDS_SUCCESS or TDS_FAIL.
- See also
- _bcp_add_fixed_columns, _bcp_add_variable_columns, _bcp_send_bcp_record
◆ _bcp_get_term_var()
static int _bcp_get_term_var |
( |
const BYTE * |
pdata, |
|
|
const BYTE * |
term, |
|
|
int |
term_len |
|
) |
| |
|
static |
Get the data for bcp-in from program variables, where the program data have been identified as character terminated,
This is a low-level, internal function.
Call it correctly.
- Parameters
-
- Returns
- data length.
◆ _bcp_read_hostfile()
static STATUS _bcp_read_hostfile |
( |
DBPROCESS * |
dbproc, |
|
|
FILE * |
hostfile, |
|
|
bool * |
row_error, |
|
|
bool |
skip |
|
) |
| |
|
static |
- Parameters
-
dbproc | contains all information needed by db-lib to manage communications with the server. |
hostfile | |
row_error | |
- Returns
- MORE_ROWS, NO_MORE_ROWS, or FAIL.
- See also
- BCP_SETL(), bcp_batch(), bcp_bind(), bcp_colfmt(), bcp_colfmt_ps(), bcp_collen(), bcp_colptr(), bcp_columns(), bcp_control(), bcp_done(), bcp_exec(), bcp_getl(), bcp_init(), bcp_moretext(), bcp_options(), bcp_readfmt(), bcp_sendrow()
◆ _bcp_readfmt_colinfo()
- Parameters
-
dbproc | contains all information needed by db-lib to manage communications with the server. |
buf | |
ci | |
- Returns
- SUCCEED or FAIL.
- See also
- BCP_SETL(), bcp_batch(), bcp_bind(), bcp_colfmt(), bcp_colfmt_ps(), bcp_collen(), bcp_colptr(), bcp_columns(), bcp_control(), bcp_done(), bcp_exec(), bcp_getl(), bcp_init(), bcp_moretext(), bcp_options(), bcp_readfmt(), bcp_sendrow()
◆ rtrim()
static int rtrim |
( |
char * |
str, |
|
|
int |
len |
|
) |
| |
|
static |
trim a string of trailing blanks
Replaces spaces at the end of a string with NULs
- Parameters
-
str | pointer to a character buffer (not null-terminated) |
len | size of the str in bytes |
- Returns
- modified length