A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://www.ncbi.nlm.nih.gov/IEB/ToolBox/CPP_DOC/doxyhtml/odbc_2bcp_8cpp_source.html below:

NCBI C++ ToolKit: src/dbapi/driver/odbc/bcp.cpp Source File

39 #include <msodbcsql.h> 44 #define NCBI_USE_ERRCODE_X Dbapi_Odbc_Cmds 46 #undef NCBI_DATABASE_THROW 47 #define NCBI_DATABASE_THROW(ex_class, message, err_code, severity) \ 48  NCBI_ODBC_THROW(ex_class, message, err_code, severity) 56 #define GetDbgInfo() 0 60 #define DBDATETIME4_days(x) ((x)->numdays) 61 #define DBDATETIME4_mins(x) ((x)->nummins) 62 #define DBNUMERIC_val(x) ((x)->val) 63 #define SQL_VARLEN_DATA (-10) 79  string

extra_msg =

"Table Name: "

+

table_name

;

86  string

err_message =

"bcp_init failed."

+

GetDbgInfo

();

103  int

bcp_datatype = 0;

121  if

(

static_cast<const CDB_String

&

>

(param).GetBulkInsertionEnc()

123

bcp_datatype = SQLCHARACTER;

125

bcp_datatype = SQLNCHAR;

159

bcp_datatype = SQLDATETIME2N;

163  if

(

static_cast<const CDB_Text

&

>

(param).GetEncoding()

167

bcp_datatype = SQLNTEXT;

173

bcp_datatype = SQLCHARACTER;

175

bcp_datatype = SQLNCHAR;

201

bulk_enc =

static_cast<const CDB_String

&

>

(param).GetBulkInsertionEnc();

204

bulk_enc =

static_cast<const CDB_Text

&

>

(param).GetEncoding();

207

bulk_enc =

static_cast<const CDB_VarCharMax

&

>

(param).GetEncoding();

225

bulk_enc =

static_cast<const CDB_String

&

>

(param).GetBulkInsertionEnc();

228

bulk_enc =

static_cast<const CDB_Text

&

>

(param).GetEncoding();

231

bulk_enc =

static_cast<const CDB_VarCharMax

&

>

(param).GetEncoding();

363  if

(

val

.IsNULL()) {

364  data

.assign(

static_cast<char

*

>

(

pb

), 0);

366  val

.GetBulkInsertionData

372  if

(

val

.IsNULL()) {

374

}

else if

(bcp_getcolfmt(

GetHandle

(),

i

+ 1, BCP_FMT_DATA_LEN,

375

&length,

sizeof

(length), &

dummy

)

376

==

FAIL

|| length < 0) {

378

}

else if

(

static_cast<SIZE_TYPE>

(length) >

data

.size()) {

381

length =

data

.size();

442

DBDATETIM4* dt = (DBDATETIM4*)

pb

;

449  pb

= (

void

*) (dt + 1);

455  if

(

val

.IsNULL()) {

469  pb

= (

void

*) (dt + 1);

472 #if defined(SQLDATETIME2N) 479

dt->

day

=

lt

.Day();

488  pb

= (

void

*) (dt + 1);

495  if

(

val

.IsNULL()) {

536  char

param_buff[2048];

540  string

err_message =

"Cannot assign params."

+

GetDbgInfo

();

549  string

err_message =

"bcp_sendrow failed."

+

GetDbgInfo

();

570  size_t

left_bytes =

val

.Size();

572  size_t

valid_len = 0;

573  size_t

invalid_len = 0;

576

invalid_len =

len

- valid_len;

578  if

(valid_len <

len

) {

579  memmove

(buff, buff + valid_len, invalid_len);

582  len

=

val

.Read(buff + invalid_len,

sizeof

(buff) - invalid_len)

584  if

(

len

> left_bytes) {

595

(

LPCBYTE

)

static_cast<const char

*

>

(odbc_str)

601  string

(

"bcp_moretext for "

)

610

left_bytes -= valid_len;

611

}

while

(left_bytes);

static const void * x_GetDataPtr(EDB_Type type, void *pb)

virtual ~CODBC_BCPInCmd(void)

CODBC_BCPInCmd(CODBC_Connection &conn, SQLHDBC cmd, const string &table_name)

static const void * x_GetDataTerminator(const CDB_Object &param)

static size_t x_GetDataTermSize(const CDB_Object &param)

virtual bool Send(void)

Send command to the server.

SQLHDBC GetHandle(void) const

virtual bool EndBCP(void)

Complete the BCP and store all rows transferred in last batch into the table.

virtual bool CommitBCPTrans(void)

Complete batch – to store all rows transferred by far in this batch into the table.

virtual bool Cancel(void)

Cancel the command execution.

static size_t x_GetBCPDataSize(EDB_Type type)

static int x_GetBCPDataType(const CDB_Object &param)

virtual int RowCount(void) const

Get the number of rows affected by the command Special case: negative on error or if there is no way ...

bool x_AssignParams(void *p)

virtual bool Bind(unsigned int column_num, CDB_Object *param_ptr)

const CODBC_Connection::TDbgInfo & GetDbgInfo(void) const

bool IsMultibyteClientEncoding(void) const

EEncoding GetClientEncoding(void) const

void SetDbgInfo(const string &msg)

CODBC_Connection & GetConnection(void)

void ReportErrors(void) const

CTempString implements a light-weight string on top of a storage buffer whose lifetime management is ...

virtual void SetHasFailed(bool flag=true)

const CDB_Params & GetBindParamsImpl(void) const

void DetachInterface(void)

void SetWasSent(bool flag=true)

void DropCmd(impl::CCommand &cmd)

CDB_Object * GetParam(unsigned int param_no) const

bool BindParam(unsigned int param_no, const string &param_name, CDB_Object *param, bool is_out=false)

TStatus GetParamStatus(unsigned int param_no) const

unsigned int NofParams() const

static CS_CONNECTION * conn

struct parameters_t * pb[]

static const char table_name[]

#define DATABASE_DRIVER_ERROR(message, err_code)

static bool IsBlobType(EDB_Type db_type)

static EBlobType GetBlobType(EDB_Type db_type)

virtual EDB_Type GetType() const =0

static const char * GetTypeName(EDB_Type db_type, bool throw_on_unknown=true)

#define NCBI_CURRENT_FUNCTION

Get current function name.

#define NCBI_CATCH_ALL_X(err_subcode, message)

uint8_t Uint1

1-byte (8-bit) unsigned integer

int16_t Int2

2-byte (16-bit) signed integer

int32_t Int4

4-byte (32-bit) signed integer

int64_t Int8

8-byte (64-bit) signed integer

#define END_NCBI_SCOPE

End previously defined NCBI scope.

#define BEGIN_NCBI_SCOPE

Define ncbi namespace.

NCBI_NS_STD::string::size_type SIZE_TYPE

const char *const kEmptyCStr

Empty "C" string (points to a '\0').

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

Set BCP options for uploading a datafile.

RETCODE bcp_colptr(DBPROCESS *dbproc, BYTE *colptr, int table_column)

Override bcp_bind() by pointing to a different host variable.

RETCODE bcp_bind(DBPROCESS *dbproc, BYTE *varaddr, int prefixlen, DBINT varlen, BYTE *terminator, int termlen, int db_vartype, int table_column)

Bind a program host variable to a database column.

DBINT bcp_done(DBPROCESS *dbproc)

Conclude the transfer of data from program variables.

DBINT bcp_batch(DBPROCESS *dbproc)

Commit a set of rows to the table.

RETCODE bcp_init(DBPROCESS *dbproc, const char *tblname, const char *hfile, const char *errfile, int direction)

Prepare for bulk copy operation on a table.

RETCODE bcp_collen(DBPROCESS *dbproc, DBINT varlen, int table_column)

Set the length of a host variable to be written to a table.

RETCODE bcp_sendrow(DBPROCESS *dbproc)

Write data in host variables to the table.

Definition of all error codes used in dbapi libraries (dbapi_driver.lib and others).

SIZE_TYPE GetValidUTF8Len(const CTempString &ts)

double r(size_t dimension_, const Int4 *score_, const double *prob_, double theta_)

#define DBDATETIME4_mins(x)

SQL_SS_TIMESTAMPOFFSET_STRUCT DBTIMESTAMP

#define DBDATETIME4_days(x)


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4