Main Page   Modules   Compound List   File List   Compound Members   File Members   Related Pages  

bcp.c File Reference

Implementation of db-lib bulk copy functions. More...

#include <stdio.h>
#include <assert.h>
#include "tds.h"
#include "tdsiconv.h"
#include "tdsconvert.h"
#include "replacements.h"
#include "sybfront.h"
#include "sybdb.h"
#include "syberror.h"
#include "dblib.h"

Compounds

struct  _pbcb

Defines

#define ROWBUF_SIZE   32768
#define HOST_COL_CONV_ERROR   1
#define HOST_COL_NULL_ERROR   2
#define BCP_REC_FETCH_DATA   1
#define BCP_REC_NOFETCH_DATA   0
#define MAX(a, b)   ( (a) > (b) ? (a) : (b) )

Typedefs

typedef _pbcb TDS_PBCB

Functions

RETCODE bcp_init (DBPROCESS *dbproc, const char *tblname, const char *hfile, const char *errfile, int direction)
RETCODE bcp_collen (DBPROCESS *dbproc, DBINT varlen, int table_column)
RETCODE bcp_columns (DBPROCESS *dbproc, int host_colcount)
RETCODE bcp_colfmt (DBPROCESS *dbproc, int host_colnum, int host_type, int host_prefixlen, DBINT host_collen, const BYTE *host_term, int host_termlen, int table_colnum)
RETCODE bcp_colfmt_ps (DBPROCESS *dbproc, int host_colnum, int host_type, int host_prefixlen, DBINT host_collen, BYTE *host_term, int host_termlen, int table_colnum, DBTYPEINFO *typeinfo)
RETCODE bcp_control (DBPROCESS *dbproc, int field, DBINT value)
RETCODE bcp_options (DBPROCESS *dbproc, int option, BYTE *value, int valuelen)
RETCODE bcp_colptr (DBPROCESS *dbproc, BYTE *colptr, int table_column)
DBBOOL bcp_getl (LOGINREC *login)
RETCODE _bcp_read_hostfile (DBPROCESS *dbproc, FILE *hostfile, FILE *errfile, int *row_error)
RETCODE bcp_sendrow (DBPROCESS *dbproc)
RETCODE bcp_exec (DBPROCESS *dbproc, DBINT *rows_copied)
RETCODE bcp_readfmt (DBPROCESS *dbproc, char *filename)
int _bcp_readfmt_colinfo (DBPROCESS *dbproc, char *buf, BCP_HOSTCOLINFO *ci)
RETCODE bcp_writefmt (DBPROCESS *dbproc, char *filename)
RETCODE bcp_moretext (DBPROCESS *dbproc, DBINT size, BYTE *text)
DBINT bcp_batch (DBPROCESS *dbproc)
DBINT bcp_done (DBPROCESS *dbproc)
RETCODE bcp_bind (DBPROCESS *dbproc, BYTE *varaddr, int prefixlen, DBINT varlen, BYTE *terminator, int termlen, int vartype, int table_column)
RETCODE _bcp_get_term_var (BYTE *pdata, 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.


Detailed Description

Implementation of db-lib bulk copy functions.


Function Documentation

RETCODE _bcp_get_term_var BYTE *  pdata,
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.

Call it correctly.


Generated on Tue Mar 29 19:52:36 2005 for FreeTDS API by doxygen1.3