13 static RETCODE buffer_save_row(
DBPROCESS *dbproc);
16 #if ENABLE_EXTRA_CHECKS
21 assert(row->
sizes == NULL);
22 assert(row->
row == 0);
30 if (buf->capacity == 0 || buf->capacity == 1) {
31 assert(buf->head == 0);
32 assert(buf->tail == 0 || buf->tail == 1);
33 assert(buf->capacity == 1 || buf->rows == NULL);
37 assert(buf->capacity > 0);
38 assert(buf->head >= 0);
39 assert(buf->tail >= 0);
40 assert(buf->head < buf->capacity);
41 assert(buf->tail <= buf->capacity);
44 if (buf->tail == buf->capacity) {
45 assert(buf->head == 0);
46 for (i = 0; buf->rows && i < buf->capacity; ++i)
47 buffer_check_row_empty(&buf->rows[i]);
51 if (buf->rows == NULL)
57 assert(i >= 0 && i < buf->capacity);
58 assert(buf->rows[i].
resinfo != NULL);
59 assert(buf->rows[i].
row > 0);
60 assert(buf->rows[i].
row <= buf->received);
62 if (i == buf->capacity)
64 }
while (i != buf->head);
67 if (buf->head != buf->tail) {
70 assert(i >= 0 && i < buf->capacity);
71 buffer_check_row_empty(&buf->rows[i]);
73 if (i == buf->capacity)
75 }
while (i != buf->tail);
78 #define BUFFER_CHECK(buf) buffer_check(buf)
80 #define BUFFER_CHECK(buf) do {} while(0)
115 return (buf->head > buf->tail) ?
116 buf->head - buf->tail :
117 buf->capacity - (buf->tail - buf->head);
127 return buf->capacity == buffer_count(buf) && buf->capacity > 1;
135 if (buf->tail <= buf->head)
136 if (buf->head <= idx && idx <= buf->tail)
139 if (0 <= idx && idx <= buf->head)
142 if (buf->tail <= idx && idx < buf->capacity)
145 printf(
"buffer_index_valid: idx = %d\n", idx);
146 buffer_struct_print(buf);
156 TDS_ZERO_FREE(row->
sizes);
161 tds_free_results(row->
resinfo);
180 if (buf->rows != NULL) {
182 for (i = 0; i < buf->capacity; ++i)
183 buffer_free_row(&buf->rows[i]);
184 TDS_ZERO_FREE(buf->rows);
197 buf->current = buf->tail = buf->capacity;
204 if (++idx >= buf->capacity) {
218 if (idx < 0 || idx >= buf->capacity) {
219 printf(
"idx is %d:\n", idx);
220 buffer_struct_print(buf);
224 return &(buf->rows[idx]);
234 return buffer_row_address(buf, idx)->
row;
249 if (i == buf->capacity) {
250 assert (buf->head == 0);
259 if (buffer_idx2row(buf, i) == row_number)
262 assert(ii++ < buf->capacity);
264 i = buffer_idx_increment(buf, i);
265 }
while (i != buf->head);
280 if (count < 0 || count > buffer_count(buf)) {
281 count = buffer_count(buf);
284 for (i=0; i < count; i++) {
285 if (buf->tail < buf->capacity)
286 buffer_free_row(&buf->rows[buf->tail]);
287 buf->tail = buffer_idx_increment(buf, buf->tail);
292 if (buf->tail == buf->head) {
298 buffer_struct_print(buf);
307 buffer_transfer_bound_data(
DBPROC_ROWBUF *buf, TDS_INT res_type, TDS_INT compute_id,
DBPROCESS * dbproc,
int idx)
313 tdsdump_log(TDS_DBG_FUNC,
"buffer_transfer_bound_data(%p %d %d %p %d)\n", buf, res_type, compute_id, dbproc, idx);
315 assert(buffer_index_valid(buf, idx));
317 row = buffer_row_address(buf, idx);
320 for (i = 0; i < row->
resinfo->num_cols; i++) {
321 TDS_SERVER_TYPE srctype;
330 if (curcol->column_nullbind) {
332 *(DBINT *)(curcol->column_nullbind) = -1;
334 *(DBINT *)(curcol->column_nullbind) = 0;
337 if (!curcol->column_varaddr)
341 if (srclen == 0 || !curcol->column_nullbind)
342 dbgetnull(dbproc, curcol->column_bindtype, curcol->column_bindlen,
343 (BYTE *) curcol->column_varaddr);
352 src = curcol->column_data;
353 if (is_blob_col(curcol))
354 src = (BYTE *) ((
TDSBLOB *) src)->textvalue;
356 copy_data_to_host_var(dbproc, srctype, src, srclen,
357 (BYTE *) curcol->column_varaddr, curcol->column_bindlen,
358 curcol->column_bindtype, (DBINT*) curcol->column_nullbind);
368 buf->current = buffer_idx_increment(buf, buf->current);
377 printf(
"\t%d rows in buffer\n", buffer_count(buf));
379 printf(
"\thead = %d\t", buf->head);
380 printf(
"\ttail = %d\t", buf->tail);
381 printf(
"\tcurrent = %d\n", buf->current);
382 printf(
"\tcapacity = %d\t", buf->capacity);
383 printf(
"\thead row number = %d\n", buf->received);
405 buffer_current_index(
const DBPROCESS *dbproc)
409 buffer_struct_print(buf);
411 if (buf->capacity <= 1)
413 if (buf->current == buf->head || buf->current == buf->capacity)
416 assert(buf->current >= 0);
417 assert(buf->current < buf->capacity);
419 if( buf->tail < buf->head) {
420 assert(buf->tail < buf->current);
421 assert(buf->current < buf->head);
423 if (buf->current > buf->head)
424 assert(buf->current > buf->tail);
434 buffer_set_capacity(
DBPROCESS *dbproc,
int nrows)
450 buf->capacity = nrows;
470 assert(buf->capacity > 0);
471 assert(buf->rows == NULL);
493 assert(buf->capacity >= 0);
495 if (buffer_is_full(buf))
498 row = buffer_row_address(buf, buf->head);
503 tds_free_results(row->
resinfo);
505 row->
row = ++buf->received;
506 ++resinfo->ref_count;
511 row->
sizes = tds_new0(TDS_INT, resinfo->num_cols);
512 for (i = 0; i < resinfo->num_cols; ++i)
516 if (buf->tail == buf->capacity) {
518 assert(buf->head == 0);
523 buf->current = buf->head;
524 buf->head = buffer_idx_increment(buf, buf->head);
537 int idx = buf->head - 1;
539 if (buf->capacity <= 1)
543 idx = buf->capacity - 1;
544 if (idx >= 0 && idx < buf->capacity) {
545 row = &buf->rows[idx];
Definition: cstypes.h:129
unsigned int bulk_copy
if bulk copy should be enabled
Definition: tds.h:557
int tds7_get_instance_port(struct addrinfo *addr, const char *instance)
Get port of given instance.
Definition: net.c:1229
unsigned char tds_peek(TDSSOCKET *tds)
Reads a byte from the TDS stream without removing it.
Definition: read.c:100
Primary include file for db-lib applications.
Store variant informations.
Definition: tds.h:605
Definition: cstypes.h:159
TDSRET tds_alloc_row(TDSRESULTINFO *res_info)
Allocate space for row store return NULL on out of memory.
Definition: mem.c:524
TDSRET tds_submit_unprepare(TDSSOCKET *tds, TDSDYNAMIC *dyn)
Send a unprepare request for a prepared query.
Definition: query.c:1797
TDS_INT month
month number (0-11)
Definition: tds.h:163
TDS_INT second
0-59
Definition: tds.h:169
struct addrinfo * ip_addrs
ip(s) of server
Definition: tds.h:547
DSTR server_name
server name (in freetds.conf)
Definition: tds.h:519
TDSRET tds_bcp_start_copy_in(TDSSOCKET *tds, TDSBCPINFO *bcpinfo)
Start bulk copy to server.
Definition: bulk.c:887
Definition: buffering.h:1
void tds_set_param_type(TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type)
Set type of column initializing all dependency.
Definition: data.c:249
TDSRET tds_submit_execute(TDSSOCKET *tds, TDSDYNAMIC *dyn)
Sends a previously prepared dynamic statement to the server.
Definition: query.c:1630
DBINT dbvarylen(DBPROCESS *dbproc, int column)
Determine whether a column can vary in size.
Definition: dblib.c:3222
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)
Specify the format of a host file for bulk copy purposes, with precision and scale support for numeri...
Definition: bcp.c:508
Definition: cstypes.h:114
TDSRET tds_submit_rpc(TDSSOCKET *tds, const char *rpc_name, TDSPARAMINFO *params, TDSHEADERS *head)
Calls a RPC from server.
Definition: query.c:1929
TDSRET tds_submit_queryf(TDSSOCKET *tds, const char *queryf,...)
Format and submit a query.
Definition: query.c:467
Information about blobs (e.g.
Definition: tds.h:594
TDS_INT year
year
Definition: tds.h:161
Definition: cstypes.h:191
TDS_INT8 rows_affected
rows updated/deleted/inserted/selected, TDS_NO_COUNT if not valid
Definition: tds.h:1255
TDSRET tds_bcp_done(TDSSOCKET *tds, int *rows_copied)
Tell we finished sending BCP data to server.
Definition: bulk.c:810
static TDSRET _bcp_get_col_data(TDSBCPINFO *bcpinfo, TDSCOLUMN *bindcol, int offset)
For a bcp in from program variables, get the data from the host variable.
Definition: bcp.c:2175
TDS_INT cursor_rows
< number of updatable columns
Definition: tds.h:952
TDS_TINYINT column_prec
precision for decimal/numeric
Definition: tds.h:704
TDSRET tds_bcp_start(TDSSOCKET *tds, TDSBCPINFO *bcpinfo)
Start sending BCP data to server.
Definition: bulk.c:840
int tdsdump_open(const char *filename)
Create and truncate a human readable dump file for the TDS traffic.
Definition: log.c:112
#define tds_dstr_empty(s)
Make a string empty.
Definition: string.h:91
Hold information for any results.
Definition: tds.h:770
this structure is not directed connected to a TDS protocol but keeps any DATE/TIME information.
Definition: tds.h:147
Definition: cspublic.h:699
TDS_INT cursor_id
cursor id returned by the server after cursor declare
Definition: tds.h:942
const char * dbprtype(int token)
Print a token value's name to a buffer.
Definition: dblib.c:6451
TDSENV env
environment is shared between all sessions
Definition: tds.h:1102
Information for a server connection.
Definition: tds.h:1164
TDSPARAMINFO * tds_alloc_param_result(TDSPARAMINFO *old_param)
Adds a output parameter to TDSPARAMINFO.
Definition: mem.c:284
const int tds_numeric_bytes_per_prec[]
The following little table is indexed by precision and will tell us the number of bytes required to s...
Definition: numeric.c:41
RETCODE bcp_options(DBPROCESS *dbproc, int option, BYTE *value, int valuelen)
Set "hints" for uploading a file. A FreeTDS-only function.
Definition: bcp.c:621
static int _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 charac...
Definition: bcp.c:2289
static void _bcp_free_storage(DBPROCESS *dbproc)
Definition: bcp.c:2369
TDSRET tds_submit_optioncmd(TDSSOCKET *tds, TDS_OPTION_CMD command, TDS_OPTION option, TDS_OPTION_ARG *param, TDS_INT param_size)
Send option commands to server.
Definition: query.c:3389
size_t tds_iconv(TDSSOCKET *tds, TDSICONV *conv, TDS_ICONV_DIRECTION io, const char **inbuf, size_t *inbytesleft, char **outbuf, size_t *outbytesleft)
Wrapper around iconv(3).
Definition: iconv.c:590
static int rtrim(char *, int)
trim a string of trailing blanks
Definition: bcp.c:2315
TDSRET tds_submit_query(TDSSOCKET *tds, const char *query)
Sends a language string to the database server for processing.
Definition: query.c:210
static RETCODE _bcp_exec_out(DBPROCESS *dbproc, DBINT *rows_copied)
Definition: bcp.c:870
#define is_datetime_type(x)
return true if type is a datetime (but not date or time)
Definition: tds.h:394
unsigned char tds_willconvert(int srctype, int desttype)
Test if a conversion is possible.
Definition: convert.c:3056
RETCODE bcp_init(DBPROCESS *dbproc, const char *tblname, const char *hfile, const char *errfile, int direction)
Prepare for bulk copy operation on a table.
Definition: bcp.c:166
DSTR server_spn
server SPN (in freetds.conf)
Definition: tds.h:529
int dbperror(DBPROCESS *dbproc, DBINT msgno, long errnum,...)
Call client-installed error handler.
Definition: dblib.c:8131
const char * tds_prtype(int type)
Returns string representation of the given type.
Definition: token.c:3052
A structure to hold all the compile-time settings.
Definition: tds.h:83
DSTR * tds_dstr_copyn(DSTR *s, const char *src, size_t length)
Set string to a given buffer of characters.
Definition: tdsstring.c:77
RETCODE bcp_colptr(DBPROCESS *dbproc, BYTE *colptr, int table_column)
Override bcp_bind() by pointing to a different host variable.
Definition: bcp.c:669
int port
port of database service
Definition: tds.h:520
TDSDYNAMIC * cur_dyn
dynamic structure in use
Definition: tds.h:1257
size_t tds_strftime(char *buf, size_t maxsize, const char *format, const TDSDATEREC *dr, int prec)
format a date string according to an "extended" strftime(3) formatting definition.
Definition: convert.c:2968
TDSRESULTINFO * current_results
Current query information.
Definition: tds.h:1239
DSTR server_charset
charset of server e.g.
Definition: tds.h:524
char * cursor_name
name of the cursor
Definition: tds.h:941
static int tds_dstr_isempty(const DSTR *s)
test if string is empty
Definition: string.h:60
TDSRET tds_set_interfaces_file_loc(const char *interf)
Set the full name of interface file.
Definition: config.c:965
DBINT bcp_batch(DBPROCESS *dbproc)
Commit a set of rows to the table.
Definition: bcp.c:2007
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)
Specify the format of a datafile prior to writing to a table.
Definition: bcp.c:376
void tds_set_column_type(TDSCONNECTION *conn, TDSCOLUMN *curcol, TDS_SERVER_TYPE type)
Set type of column initializing all dependency.
Definition: data.c:227
TDSRET tds_bcp_fread(TDSSOCKET *tds, TDSICONV *char_conv, FILE *stream, const char *terminator, size_t term_len, char **outbuf, size_t *outbytes)
Read a data file, passing the data through iconv().
Definition: bulk.c:1048
char * query
SQL query.
Definition: tds.h:948
TDSRESULTINFO * resinfo
pointer to result informations
Definition: buffering.h:3
void tdsdump_log(const char *file, unsigned int level_line, const char *fmt,...)
Write a message to the debug log.
Definition: log.c:354
TDS_INT tds_convert(const TDSCONTEXT *tds_ctx, int srctype, const void *src, TDS_UINT srclen, int desttype, CONV_RESULT *cr)
tds_convert convert a type to another.
Definition: convert.c:1878
int msdblib
boolean use ms behaviour
Definition: dblib.h:154
TDS_INT column_size
maximun size of data.
Definition: tds.h:695
static TDSRET _bcp_convert_in(DBPROCESS *dbproc, TDS_SERVER_TYPE srctype, const TDS_CHAR *src, TDS_UINT srclen, TDS_SERVER_TYPE desttype, BCPCOLDATA *coldata)
Convert column for input to a table.
Definition: bcp.c:1052
void tds_close_socket(TDSSOCKET *tds)
Close current socket.
Definition: net.c:548
bool tds_set_server(TDSLOGIN *tds_login, const char *server) TDS_WUR
Set the servername in a TDSLOGIN structure.
Definition: login.c:125
TDSRET tds_bcp_send_record(TDSSOCKET *tds, TDSBCPINFO *bcpinfo, tds_bcp_get_col_data get_col_data, tds_bcp_null_error ignored, int offset)
Send one row of data to server.
Definition: bulk.c:337
Definition: cstypes.h:135
int block_size
packet size (512-65535)
Definition: tds.h:966
TDSLOGIN * tds_read_config_info(TDSSOCKET *tds, TDSLOGIN *login, TDSLOCALE *locale)
tds_read_config_info() will fill the tds connection structure based on configuration information gath...
Definition: config.c:138
Holds information for a dynamic (also called prepared) query.
Definition: tds.h:978
static const char * tds_dstr_cstr(const DSTR *s)
Returns a C version (NUL terminated string) of dstr.
Definition: string.h:78
RETCODE dbgetnull(DBPROCESS *dbproc, int bindtype, int varlen, BYTE *varaddr)
Definition: dblib.c:534
TDSPARAMINFO * params
query parameters.
Definition: tds.h:1008
TDSRET tds_process_tokens(TDSSOCKET *tds, TDS_INT *result_type, int *done_flags, unsigned flag)
process all streams.
Definition: token.c:530
TDS_INT minute
0-59
Definition: tds.h:168
TDS_TINYINT options
read only|updatable TODO use it
Definition: tds.h:943
void tds_free_input_params(TDSDYNAMIC *dyn)
Frees all allocated input parameters of a dynamic statement.
Definition: mem.c:206
static size_t tds_dstr_len(const DSTR *s)
Returns the length of the string in bytes.
Definition: string.h:85
TDS_TINYINT column_scale
scale for decimal/numeric
Definition: tds.h:705
@ TDS_DONE_ERROR
error occurred
Definition: tds.h:254
TDS_INT decimicrosecond
0-9999999
Definition: tds.h:170
TDS_STATE tds_set_state(TDSSOCKET *tds, TDS_STATE state)
Set state of TDS connection, with logging and checking.
Definition: util.c:58
Holds informations about a cursor.
Definition: tds.h:938
TDS_INT day
day of month (1-31)
Definition: tds.h:164
TDSRET tds_submit_prepare(TDSSOCKET *tds, const char *query, const char *id, TDSDYNAMIC **dyn_out, TDSPARAMINFO *params)
Creates a temporary stored procedure in the server.
Definition: query.c:1124
Definition: cstypes.h:153
static TDSRET _bcp_no_get_col_data(TDSBCPINFO *bcpinfo, TDSCOLUMN *bindcol, int offset)
Function to read data from file.
Definition: bcp.c:2268
static RETCODE _bcp_exec_in(DBPROCESS *dbproc, DBINT *rows_copied)
Definition: bcp.c:1432
int query_timeout
not used unless positive
Definition: ctlib.h:102
static STATUS _bcp_read_hostfile(DBPROCESS *dbproc, FILE *hostfile, int *row_error, bool skip)
Definition: bcp.c:1139
TDS_SERVER_TYPE tds_get_conversion_type(TDS_SERVER_TYPE srctype, int colsize)
Return type suitable for conversions (convert all nullable types to fixed type)
Definition: tds_types.h:125
char * tds_strndup(const void *s, TDS_INTPTR len)
Copy a string of length len to a new allocated buffer This function does not read more than len bytes...
Definition: util.c:408
TDSPARAMINFO * res_info
query results
Definition: tds.h:1000
TDSRET tds_writetext_continue(TDSSOCKET *tds, const TDS_UCHAR *text, TDS_UINT size)
Send some data in the writetext request started by tds_writetext_start.
Definition: bulk.c:1156
DBINT row
row number
Definition: buffering.h:7
TDS_INT column_cur_size
size written in variable (ie: char, text, binary).
Definition: tds.h:737
Structure to hold a string.
Definition: string.h:36
TDSICONV * char_conv
refers to previously allocated iconv information
Definition: tds.h:713
TDS_TINYINT column_varint_size
size of length when reading from wire (0, 1, 2 or 4)
Definition: tds.h:702
int login_timeout
not used unless positive
Definition: ctlib.h:101
RETCODE bcp_collen(DBPROCESS *dbproc, DBINT varlen, int table_column)
Set the length of a host variable to be written to a table.
Definition: bcp.c:265
TDS_INT weekday
day of week (0-6, 0 = sunday)
Definition: tds.h:166
int tds_write_dump
Tell if TDS debug logging is turned on or off.
Definition: log.c:58
RETCODE bcp_readfmt(DBPROCESS *dbproc, const char filename[])
Read a format definition file.
Definition: bcp.c:1675
Used by tds_datecrack.
Definition: tds.h:160
TDSRET tds_writetext_end(TDSSOCKET *tds)
Finish sending writetext data.
Definition: bulk.c:1173
TDSRET tds_writetext_start(TDSSOCKET *tds, const char *objname, const char *textptr, const char *timestamp, int with_log, TDS_UINT size)
Start writing writetext request.
Definition: bulk.c:1118
int tds_get_size_by_type(TDS_SERVER_TYPE servertype)
Return the number of bytes needed by specified type.
Definition: tds_types.h:9
TDS_INT ret_status
return status from store procedure
Definition: tds.h:1251
DSTR password
password of account login
Definition: tds.h:536
TDSRET tds_datecrack(TDS_INT datetype, const void *di, TDSDATEREC *dr)
Convert from db date format to a structured date format.
Definition: convert.c:3122
TDSRET tds_submit_query_params(TDSSOCKET *tds, const char *query, TDSPARAMINFO *params, TDSHEADERS *head)
Sends a language string to the database server for processing.
Definition: query.c:350
const TDS_COMPILETIME_SETTINGS * tds_get_compiletime_settings(void)
Return a structure capturing the compile-time settings provided to the configure script.
Definition: config.c:1341
int tds7_get_instance_ports(FILE *output, struct addrinfo *addr)
Get port of all instances.
Definition: net.c:1093
TDS_INT bcp_prefix_len
The length, in bytes, of any length prefix this column may have.
Definition: tds.h:762
void tds_release_dynamic(TDSDYNAMIC **pdyn)
Frees dynamic statement.
Definition: mem.c:253
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.
Definition: bcp.c:2076
Definition: cspublic.h:685
DSTR * tds_dstr_dup(DSTR *s, const DSTR *src)
Duplicate a string from another dynamic string.
Definition: tdsstring.c:134
TDSRET tds_bcp_init(TDSSOCKET *tds, TDSBCPINFO *bcpinfo)
Initialize BCP information.
Definition: bulk.c:82
@ TDS_PENDING
cilent is waiting for data
Definition: tds.h:794
RETCODE bcp_control(DBPROCESS *dbproc, int field, DBINT value)
Set BCP options for uploading a datafile.
Definition: bcp.c:543
Metadata about columns in regular and compute rows.
Definition: tds.h:690
RETCODE bcp_exec(DBPROCESS *dbproc, DBINT *rows_copied)
Write a datafile to a table.
Definition: bcp.c:1614
TDS_INT hour
0-23
Definition: tds.h:167
@ TDS_DEAD
no connection
Definition: tds.h:796
TDSRET tds_flush_packet(TDSSOCKET *tds)
Flush packet to server.
Definition: write.c:224
unsigned char * row_data
row data, NULL for resinfo->current_row
Definition: buffering.h:5
DBINT bcp_done(DBPROCESS *dbproc)
Conclude the transfer of data from program variables.
Definition: bcp.c:2034
TDSRET tds_process_cancel(TDSSOCKET *tds)
Definition: token.c:2550
DSTR user_name
account for login
Definition: tds.h:535
TDSRET tds_send_cancel(TDSSOCKET *tds)
tds_send_cancel() sends an empty packet (8 byte header only) tds_process_cancel should be called dire...
Definition: query.c:2026
RETCODE bcp_columns(DBPROCESS *dbproc, int host_colcount)
Indicate how many columns are to be found in the datafile.
Definition: bcp.c:300
TDS_INT dayofyear
day of year (1-366)
Definition: tds.h:165
TDS_SERVER_TYPE column_type
This type can be different from wire type because conversion (e.g.
Definition: tds.h:697
static int _bcp_convert_out(DBPROCESS *dbproc, TDSCOLUMN *curcol, BCP_HOSTCOLINFO *hostcol, TDS_UCHAR **p_data, const char *bcpdatefmt)
Convert column for output (usually to a file) Conversion is slightly different from input as:
Definition: bcp.c:723
Definition: cstypes.h:177
struct addrinfo * tds_lookup_host(const char *servername)
Get the IP address for a hostname.
Definition: config.c:991
static int _bcp_readfmt_colinfo(DBPROCESS *dbproc, char *buf, BCP_HOSTCOLINFO *ci)
Definition: bcp.c:1772
static char * _bcp_fgets(char *buffer, int size, FILE *f)
Definition: bcp.c:1649
RETCODE bcp_sendrow(DBPROCESS *dbproc)
Write data in host variables to the table.
Definition: bcp.c:1380
Definition: cstypes.h:147
static void _bcp_free_columns(DBPROCESS *dbproc)
Definition: bcp.c:2343
TDS_CURSOR_STATUS status
cursor parameter
Definition: tds.h:954
TDS_INT * sizes
save old sizes
Definition: buffering.h:9
DBBOOL bcp_getl(LOGINREC *login)
See if BCP_SETL() was used to set the LOGINREC for BCP work.
Definition: bcp.c:705
void * tds_alloc_param_data(TDSCOLUMN *curparam)
Allocate data for a parameter.
Definition: mem.c:364
void tdsdump_close(void)
Close the TDS dump log file.
Definition: log.c:193
TDSRET tds_cursor_dealloc(TDSSOCKET *tds, TDSCURSOR *cursor)
Send a deallocation request to server.
Definition: query.c:3006
DSTR * tds_dstr_copy(DSTR *s, const char *src)
copy a string from another
Definition: tdsstring.c:122
Definition: bsqlodbc.c:100