(
intargc,
char**argv)
61printf(
"Starting %s\n", argv[0]);
69printf(
"About to logon\n");
88strcpy(s1,
"test short");
99printf(
"Sending some rows... \n");
101fprintf(stderr,
"send failed\n");
108fprintf(stderr,
"send failed\n");
119fprintf(stderr,
"send NULL succeeded\n");
126fprintf(stderr,
"Bulk copy unsuccessful.\n");
132fprintf(stderr,
"Bulk copy unsuccessful.\n");
147fprintf(stderr,
"send failed\n");
155 if(num_rows != -1) {
156fprintf(stderr,
"Bulk copy successful. %d rows returned\n", num_rows);
173fprintf(stderr,
"Expected %d row(s), got %d\n",
expected, num_rows);
185printf(
"%s OK\n", __FILE__);
static void doexit(int value)
int main(int argc, char **argv)
static int init(DBPROCESS *dbproc, const char *name)
CS_RETCODE read_login_info(void)
int syb_err_handler(DBPROCESS *dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr)
RETCODE sql_cmd(DBPROCESS *dbproc)
int syb_msg_handler(DBPROCESS *dbproc, DBINT msgno, int msgstate, int severity, char *msgtext, char *srvname, char *procname, int line)
void set_malloc_options(void)
static DBPROCESS * dbproc
static const char table_name[]
static const char * expected[]
#define BCP_SETL(x, y)
Enable (or prevent) bcp operations for connections made with a login.
#define DBSETLPWD(x, y)
Set the password in the login packet.
#define DBSETLAPP(x, y)
Set the (client) application name in the login packet.
#define DBSETLUSER(x, y)
Set the username in the login packet.
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.
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_sendrow(DBPROCESS *dbproc)
Write data in host variables to the table.
LOGINREC * dblogin(void)
Allocate a LOGINREC structure.
#define DBTDS(a)
Sybase macro, maps to the internal (lower-case) function.
RETCODE dbresults(DBPROCESS *dbproc)
Set up query results.
RETCODE dbinit(void)
Initialize db-lib.
RETCODE dbuse(DBPROCESS *dbproc, const char *name)
Change current database.
RETCODE dbsqlexec(DBPROCESS *dbproc)
send the SQL command to the server and wait for an answer.
EHANDLEFUNC dberrhandle(EHANDLEFUNC handler)
Set an error handler, for messages from db-lib.
RETCODE dbsetversion(DBINT version)
Specify a db-lib version level.
void dbsetuserdata(DBPROCESS *dbproc, BYTE *ptr)
Associate client-allocated (and defined) data with a DBPROCESS.
void dbloginfree(LOGINREC *login)
free the LOGINREC
void dbexit()
Close server connections and free all related structures.
MHANDLEFUNC dbmsghandle(MHANDLEFUNC handler)
Set a message handler, for messages from the server.
const GenericPointer< typename T::ValueType > T2 value
#define TRUE
bool replacment for C indicating true.
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