Definition: datacopy.c:62
RETCODE bcp_readfmt(DBPROCESS *dbproc, const char filename[])
Read a format definition file.
Definition: bcp.c:1678
void dbsetifile(char *filename)
set name and location of the interfaces file FreeTDS should use to look up a servername.
Definition: dblib.c:2711
Main include file for libtds.
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:167
#define DBSETLCHARSET(x, y)
Set the client character set in the login packet.
Definition: sybdb.h:1276
#define DBSETLPACKET(x, y)
Set the packet size in the login packet for new connections.
Definition: sybdb.h:1278
Definition: bsqlodbc.c:100
#define DBSETLUSER(x, y)
Set the username in the login packet.
Definition: sybdb.h:1251
EHANDLEFUNC dberrhandle(EHANDLEFUNC handler)
Set an error handler, for messages from db-lib.
Definition: dblib.c:5121
RETCODE bcp_columns(DBPROCESS *dbproc, int host_colcount)
Indicate how many columns are to be found in the datafile.
Definition: bcp.c:301
RETCODE dbresults(DBPROCESS *dbproc)
Set up query results.
Definition: dblib.c:1694
RETCODE bcp_control(DBPROCESS *dbproc, int field, DBINT value)
Set BCP options for uploading a datafile.
Definition: bcp.c:544
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:377
#define BCP_SETL(x, y)
Enable (or prevent) bcp operations for connections made with a login.
Definition: sybdb.h:1264
RETCODE dbcmd(DBPROCESS *dbproc, const char cmdstring[])
Append SQL to the command buffer.
Definition: dblib.c:1373
DBPROCESS * dbopen(LOGINREC *login, const char *server)
Normally not used.
Definition: dbopen.c:36
int dbcoltype(DBPROCESS *dbproc, int column)
Get the datatype of a regular result set column.
Definition: dblib.c:2970
MHANDLEFUNC dbmsghandle(MHANDLEFUNC handler)
Set a message handler, for messages from the server.
Definition: dblib.c:5140
RETCODE dbinit(void)
Initialize db-lib.
Definition: dblib.c:660
RETCODE dbsqlexec(DBPROCESS *dbproc)
send the SQL command to the server and wait for an answer.
Definition: dblib.c:1419
Primary include file for db-lib applications.
int tdsdump_open(const char *filename)
Create and truncate a human readable dump file for the TDS traffic.
Definition: log.c:131
RETCODE dbfcmd(DBPROCESS *dbproc, const char *fmt,...)
printf-like way to form SQL to send to the server.
Definition: dblib.c:1334
RETCODE bcp_options(DBPROCESS *dbproc, int option, BYTE *value, int valuelen)
Set "hints" for uploading a file.
Definition: bcp.c:622
#define DBSETLPWD(x, y)
Set the password in the login packet.
Definition: sybdb.h:1254
void dbloginfree(LOGINREC *login)
free the LOGINREC
Definition: dblib.c:737
RETCODE bcp_exec(DBPROCESS *dbproc, DBINT *rows_copied)
Write a datafile to a table.
Definition: bcp.c:1617
int dbnumcols(DBPROCESS *dbproc)
Return number of regular columns in a result set.
Definition: dblib.c:1848
#define DBSETLAPP(x, y)
Set the (client) application name in the login packet.
Definition: sybdb.h:1261
LOGINREC * dblogin(void)
Allocate a LOGINREC structure.
Definition: dblib.c:705