00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _sybdb_h_
00021 #define _sybdb_h_
00022
00023 #include "tds.h"
00024
00025 #ifdef __cplusplus
00026 extern "C"
00027 {
00028 #if 0
00029 }
00030 #endif
00031 #endif
00032
00033 static char rcsid_sybdb_h[] = "$Id: sybdb.h,v 1.54 2003/11/01 23:02:08 jklowden Exp $";
00034 static void *no_unused_sybdb_h_warn[] = { rcsid_sybdb_h, no_unused_sybdb_h_warn };
00035
00041 #ifdef FALSE
00042 #undef FALSE
00043 #endif
00044 #ifdef TRUE
00045 #undef TRUE
00046 #endif
00047 #define FALSE 0
00048 #define TRUE 1
00049
00050 #define DBSAVE 1
00051 #define DBNOSAVE 0
00052 #define DBNOERR -1
00053
00054 #define INT_EXIT TDS_INT_EXIT
00055 #define INT_CONTINUE TDS_INT_CONTINUE
00056 #define INT_CANCEL TDS_INT_CANCEL
00057 #define INT_TIMEOUT TDS_INT_TIMEOUT
00058
00059 #define DBMAXNUMLEN 33
00060 #define DBMAXNAME 30
00061
00065 #define DBVERSION_UNKNOWN 0
00066 #define DBVERSION_46 1
00067 #define DBVERSION_100 2
00068 #define DBVERSION_42 3
00069 #define DBVERSION_70 4
00070 #define DBVERSION_80 5
00071
00072
00073 #define DBVER42 DBVERSION_42
00074 #define DBVER60 DBVERSION_70
00075
00080 #define DBTDS_UNKNOWN 0
00081 #define DBTDS_2_0 1
00082 #define DBTDS_3_4 2
00083 #define DBTDS_4_0 3
00084 #define DBTDS_4_2 4
00085 #define DBTDS_4_6 5
00086 #define DBTDS_4_9_5 6
00087 #define DBTDS_5_0 7
00088 #define DBTDS_7_0 8
00089 #define DBTDS_8_0 9
00090
00091 #define DBTXPLEN 16
00092
00093 #define BCPMAXERRS 1
00094 #define BCPFIRST 2
00095 #define BCPLAST 3
00096 #define BCPBATCH 4
00097
00098 #define BCPLABELED 5
00099 #define BCPHINTS 6
00100
00101 #define DBCMDNONE 0
00102 #define DBCMDPEND 1
00103 #define DBCMDSENT 2
00104
00105 #define DBRESINIT 0
00106 #define DBRESSUCC 1
00107 #define DBRESDONE 2
00108 #define DBRESCMDS 0x80
00109
00110 typedef int RETCODE;
00111
00112 typedef void DBCURSOR;
00113 typedef void DBXLATE;
00114 typedef void DBSORTORDER;
00115 typedef void DBLOGINFO;
00116 typedef void *DBVOIDPTR;
00117 typedef short SHORT;
00118 typedef unsigned short USHORT;
00119 typedef int (*INTFUNCPTR) (void *, ...);
00120 typedef int (*DBWAITFUNC) (void);
00121 typedef DBWAITFUNC(*DB_DBBUSY_FUNC) (void *dbproc);
00122 typedef void (*DB_DBIDLE_FUNC) (DBWAITFUNC dfunc, void *dbproc);
00123 typedef int (*DB_DBCHKINTR_FUNC) (void *dbproc);
00124 typedef int (*DB_DBHNDLINTR_FUNC) (void *dbproc);
00125
00126 #ifndef __INCvxWorksh
00127
00128
00129
00130
00131 #ifdef STATUS
00132
00133
00134
00135 #undef STATUS
00136 #endif
00137 typedef int STATUS;
00138 typedef unsigned char BOOL;
00139 #endif
00140
00141 typedef unsigned char DBBOOL;
00142 typedef TDS_CHAR DBCHAR;
00143 typedef unsigned char DBTINYINT;
00144 typedef TDS_SMALLINT DBSMALLINT;
00145 typedef TDS_INT DBINT;
00146 typedef unsigned char DBBINARY;
00147 typedef TDS_REAL DBREAL;
00148 typedef TDS_FLOAT DBFLT8;
00149 typedef unsigned short DBUSMALLINT;
00150 typedef TDS_NUMERIC DBNUMERIC;
00151 typedef TDS_MONEY DBMONEY;
00152 typedef TDS_MONEY4 DBMONEY4;
00153 typedef TDS_DATETIME DBDATETIME;
00154 typedef TDS_DATETIME4 DBDATETIME4;
00155
00156 #ifdef MSDBLIB
00157 #define SQLCHAR SYBCHAR
00158 #endif
00159
00160 typedef struct
00161 {
00162 TDSLOGIN *tds_login;
00163 } LOGINREC;
00164
00165 typedef unsigned char BYTE;
00166
00167 typedef struct dbtypeinfo
00168 {
00169 DBINT precision;
00170 DBINT scale;
00171 } DBTYPEINFO;
00172
00173 typedef struct tag_DBPROC_ROWBUF
00174 {
00175 int buffering_on;
00176 int first_in_buf;
00177 int next_row;
00178 int newest;
00179 int oldest;
00180 int elcount;
00181 int element_size;
00182 int rows_in_buf;
00183 void *rows;
00184 } DBPROC_ROWBUF;
00185
00186 typedef struct
00187 {
00188 int host_column;
00189 void *host_var;
00190 int datatype;
00191 int prefix_len;
00192 DBINT column_len;
00193 BYTE *terminator;
00194 int term_len;
00195 int tab_colnum;
00196 int column_error;
00197 } BCP_HOSTCOLINFO;
00198
00199 struct dbstring
00200 {
00201 BYTE *strtext;
00202 DBINT strtotlen;
00203 struct dbstring *strnext;
00204 };
00205 typedef struct dbstring DBSTRING;
00206
00207
00208 #define DBPARSEONLY 0
00209 #define DBESTIMATE 1
00210 #define DBSHOWPLAN 2
00211 #define DBNOEXEC 3
00212 #define DBARITHIGNORE 4
00213 #define DBNOCOUNT 5
00214 #define DBARITHABORT 6
00215 #define DBTEXTLIMIT 7
00216 #define DBBROWSE 8
00217 #define DBOFFSET 9
00218 #define DBSTAT 10
00219 #define DBERRLVL 11
00220 #define DBCONFIRM 12
00221 #define DBSTORPROCID 13
00222 #define DBBUFFER 14
00223 #define DBNOAUTOFREE 15
00224 #define DBROWCOUNT 16
00225 #define DBTEXTSIZE 17
00226 #define DBNATLANG 18
00227 #define DBDATEFORMAT 19
00228 #define DBPRPAD 20
00229 #define DBPRCOLSEP 21
00230 #define DBPRLINELEN 22
00231 #define DBPRLINESEP 23
00232 #define DBLFCONVERT 24
00233 #define DBDATEFIRST 25
00234 #define DBCHAINXACTS 26
00235 #define DBFIPSFLAG 27
00236 #define DBISOLATION 28
00237 #define DBAUTH 29
00238 #define DBIDENTITY 30
00239 #define DBNOIDCOL 31
00240 #define DBDATESHORT 32
00241 #define DBCLIENTCURSORS 33
00242 #define DBSETTIME 34
00243 #define DBQUOTEDIDENT 35
00244
00245 #define DBNUMOPTIONS 36
00246
00247 #define DBPADOFF 0
00248 #define DBPADON 1
00249
00250 #define OFF 0
00251 #define ON 1
00252
00253 #define NOSUCHOPTION 2
00254
00255 #define MAXOPTTEXT 32
00256
00257 struct dboption
00258 {
00259 char opttext[MAXOPTTEXT];
00260 DBSTRING *optparam;
00261 DBUSMALLINT optstatus;
00262 DBBOOL optactive;
00263 struct dboption *optnext;
00264 };
00265 typedef struct dboption DBOPTION;
00266
00267
00268
00269 typedef struct _DBREMOTE_PROC_PARAM
00270 {
00271 struct _DBREMOTE_PROC_PARAM *next;
00272
00273 char *name;
00274 BYTE status;
00275 int type;
00276 DBINT maxlen;
00277 DBINT datalen;
00278 BYTE *value;
00279 } DBREMOTE_PROC_PARAM;
00280
00281 typedef struct
00282 {
00283 char *hint;
00284 TDS_CHAR *hostfile;
00285 TDS_CHAR *errorfile;
00286 TDS_CHAR *tablename;
00287 TDS_CHAR *insert_stmt;
00288 TDS_INT direction;
00289 TDS_INT db_colcount;
00290 TDS_INT host_colcount;
00291 BCP_COLINFO **db_columns;
00292 BCP_HOSTCOLINFO **host_columns;
00293 TDS_INT firstrow;
00294 TDS_INT lastrow;
00295 TDS_INT maxerrs;
00296 TDS_INT batch;
00297 } DBBULKCOPY;
00298
00299 typedef struct _DBREMOTE_PROC
00300 {
00301 struct _DBREMOTE_PROC *next;
00302
00303 char *name;
00304 DBSMALLINT options;
00305 DBREMOTE_PROC_PARAM *param_list;
00306 } DBREMOTE_PROC;
00307
00308 typedef struct
00309 {
00310 TDSSOCKET *tds_socket;
00311
00312 DBPROC_ROWBUF row_buf;
00313
00314 int noautofree;
00315 int more_results;
00316 int dbresults_state;
00317 int dbresults_retcode;
00318 BYTE *user_data;
00319 unsigned char *dbbuf;
00320 int dbbufsz;
00321 int command_state;
00322 TDS_INT text_size;
00323 TDS_INT text_sent;
00324 FILE *bcp_errfileptr;
00325 TDS_INT sendrow_init;
00326 TDS_INT var_cols;
00327 DBTYPEINFO typeinfo;
00328 unsigned char avail_flag;
00329 DBOPTION *dbopts;
00330 DBSTRING *dboptcmd;
00331 DBBULKCOPY bcp;
00332 DBREMOTE_PROC *rpc;
00333 DBUSMALLINT envchange_rcv;
00334 char dbcurdb[DBMAXNAME + 1];
00335 char servcharset[DBMAXNAME + 1];
00336 FILE *ftos;
00337 DB_DBCHKINTR_FUNC dbchkintr;
00338 DB_DBHNDLINTR_FUNC dbhndlintr;
00339 } DBPROCESS;
00340
00341 typedef struct dbdaterec
00342 {
00343 #ifndef MSDBLIB
00344 DBINT dateyear;
00345 DBINT datemonth;
00346 DBINT datedmonth;
00347 DBINT datedyear;
00348 DBINT datedweek;
00349 DBINT datehour;
00350 DBINT dateminute;
00351 DBINT datesecond;
00352 DBINT datemsecond;
00353 DBINT datetzone;
00354 #else
00355 DBINT year;
00356 DBINT month;
00357 DBINT day;
00358 DBINT dayofyear;
00359 DBINT weekday;
00360 DBINT hour;
00361 DBINT minute;
00362 DBINT second;
00363 DBINT millisecond;
00364 DBINT tzone;
00365 #endif
00366 } DBDATEREC;
00367
00368 typedef int (*EHANDLEFUNC) (DBPROCESS * dbproc, int severity, int dberr, int oserr, char *dberrstr, char *oserrstr);
00369
00370 typedef int (*MHANDLEFUNC) (DBPROCESS * dbproc, DBINT msgno, int msgstate, int severity, char *msgtext, char *srvname,
00371 char *proc, int line);
00372
00373
00374 #define DBRESULT 1
00375 #define DBNOTIFICATION 2
00376 #define DBTIMEOUT 3
00377 #define DBINTERRUPT 4
00378
00379
00380 #define DBTXTSLEN 8
00381
00382
00383 #define CHARBIND 0
00384 #define STRINGBIND 1
00385 #define NTBSTRINGBIND 2
00386 #define VARYCHARBIND 3
00387 #define TINYBIND 6
00388 #define SMALLBIND 7
00389 #define INTBIND 8
00390 #define FLT8BIND 9
00391 #define REALBIND 10
00392 #define DATETIMEBIND 11
00393 #define SMALLDATETIMEBIND 12
00394 #define MONEYBIND 13
00395 #define SMALLMONEYBIND 14
00396 #define BINARYBIND 15
00397 #define BITBIND 16
00398 #define NUMERICBIND 17
00399 #define DECIMALBIND 18
00400
00401 #define DBPRCOLSEP 21
00402 #define DBPRLINELEN 22
00403 #define DBRPCRETURN 1
00404
00405 #define REG_ROW -1
00406 #define MORE_ROWS -1
00407 #define NO_MORE_ROWS -2
00408 #define BUF_FULL -3
00409 #define NO_MORE_RESULTS 2
00410 #define SUCCEED 1
00411 #define FAIL 0
00412
00413 #define DB_IN 1
00414 #define DB_OUT 2
00415
00416 #define DBSINGLE 0
00417 #define DBDOUBLE 1
00418 #define DBBOTH 2
00419
00420
00421 #define DBRPCRECOMPILE ((DBSMALLINT) 0x0001)
00422 #define DBRPCRESET ((DBSMALLINT) 0x0002)
00423
00424 DBBOOL db12hour(DBPROCESS * dbprocess, char *language);
00425 BYTE *dbadata(DBPROCESS * dbproc, int computeid, int column);
00426 DBINT dbadlen(DBPROCESS * dbproc, int computeid, int column);
00427 RETCODE dbaltbind(DBPROCESS * dbprocess, int computeid, int column, int vartype, DBINT varlen, BYTE * varaddr);
00428 RETCODE dbaltbind_ps(DBPROCESS * dbprocess, int computeid, int column, int vartype, DBINT varlen, BYTE * varaddr,
00429 DBTYPEINFO * typeinfo);
00430 int dbaltcolid(DBPROCESS * dbproc, int computeid, int column);
00431 RETCODE dbaltlen(DBPROCESS * dbproc, int computeid, int column);
00432 int dbaltop(DBPROCESS * dbproc, int computeid, int column);
00433 int dbalttype(DBPROCESS * dbproc, int computeid, int column);
00434 RETCODE dbaltutype(DBPROCESS * dbproc, int computeid, int column);
00435 RETCODE dbanullbind(DBPROCESS * dbprocess, int computeid, int column, DBINT * indicator);
00436 RETCODE dbbind(DBPROCESS * dbproc, int column, int vartype, DBINT varlen, BYTE * varaddr);
00437 RETCODE dbbind_ps(DBPROCESS * dbprocess, int column, int vartype, DBINT varlen, BYTE * varaddr, DBTYPEINFO * typeinfo);
00438 int dbbufsize(DBPROCESS * dbprocess);
00439 BYTE *dbbylist(DBPROCESS * dbproc, int computeid, int *size);
00440 RETCODE dbcancel(DBPROCESS * dbproc);
00441 RETCODE dbcanquery(DBPROCESS * dbproc);
00442 char *dbchange(DBPROCESS * dbprocess);
00443 DBBOOL dbcharsetconv(DBPROCESS * dbprocess);
00444 void dbclose(DBPROCESS * dbproc);
00445 void dbclrbuf(DBPROCESS * dbproc, DBINT n);
00446 RETCODE dbclropt(DBPROCESS * dbproc, int option, char *param);
00447 RETCODE dbcmd(DBPROCESS * dbproc, const char *cmdstring);
00448 RETCODE dbcmdrow(DBPROCESS * dbproc);
00449
00450 #define DBCMDROW(x) dbcmdrow((x))
00451 DBBOOL dbcolbrowse(DBPROCESS * dbprocess, int colnum);
00452 DBINT dbcollen(DBPROCESS * dbproc, int column);
00453 char *dbcolname(DBPROCESS * dbproc, int column);
00454 char *dbcolsource(DBPROCESS * dbproc, int colnum);
00455 int dbcoltype(DBPROCESS * dbproc, int column);
00456 DBTYPEINFO *dbcoltypeinfo(DBPROCESS * dbproc, int column);
00457 DBINT dbcolutype(DBPROCESS * dbprocess, int column);
00458 DBINT dbconvert(DBPROCESS * dbproc, int srctype, const BYTE * src, DBINT srclen, int desttype, BYTE * dest, DBINT destlen);
00459 DBINT dbconvert_ps(DBPROCESS * dbprocess, int srctype, BYTE * src, DBINT srclen, int desttype, BYTE * dest, DBINT destlen,
00460 DBTYPEINFO * typeinfo);
00461 DBINT dbcount(DBPROCESS * dbproc);
00462
00463 #define DBCOUNT(x) dbcount((x))
00464 int dbcurcmd(DBPROCESS * dbproc);
00465
00466 #define DBCURCMD(x) dbcurcmd((x))
00467 DBINT dbcurrow(DBPROCESS * dbproc);
00468
00469 #define DBCURROW(x) dbcurrow((x))
00470 RETCODE dbcursor(DBCURSOR * hc, DBINT optype, DBINT bufno, BYTE * table, BYTE * values);
00471 RETCODE dbcursorbind(DBCURSOR * hc, int col, int vartype, DBINT varlen, DBINT * poutlen, BYTE * pvaraddr, DBTYPEINFO * typeinfo);
00472 void dbcursorclose(DBCURSOR * hc);
00473 RETCODE dbcursorcolinfo(DBCURSOR * hc, DBINT column, DBCHAR * colname, DBINT * coltype, DBINT * collen, DBINT * usertype);
00474 RETCODE dbcursorfetch(DBCURSOR * hc, DBINT fetchtype, DBINT rownum);
00475 RETCODE dbcursorinfo(DBCURSOR * hc, DBINT * ncols, DBINT * nrows);
00476 DBCURSOR *dbcursoropen(DBPROCESS * dbprocess, BYTE * stmt, SHORT scollopt, SHORT concuropt, USHORT nrows, DBINT * pstatus);
00477 BYTE *dbdata(DBPROCESS * dbproc, int column);
00478 int dbdate4cmp(DBPROCESS * dbprocess, DBDATETIME4 * d1, DBDATETIME4 * d2);
00479 RETCODE dbdate4zero(DBPROCESS * dbprocess, DBDATETIME4 * d1);
00480 RETCODE dbdatechar(DBPROCESS * dbprocess, char *buf, int datepart, int value);
00481 RETCODE dbdatecmp(DBPROCESS * dbproc, DBDATETIME * d1, DBDATETIME * d2);
00482 RETCODE dbdatecrack(DBPROCESS * dbproc, DBDATEREC * di, DBDATETIME * dt);
00483 int dbdatename(DBPROCESS * dbprocess, char *buf, int date, DBDATETIME * datetime);
00484 char *dateorder(DBPROCESS * dbprocess, char *language);
00485 DBINT dbdatepart(DBPROCESS * dbprocess, int datepart, DBDATETIME * datetime);
00486 RETCODE dbdatezero(DBPROCESS * dbprocess, DBDATETIME * d1);
00487 DBINT dbdatlen(DBPROCESS * dbproc, int column);
00488 char *dbdayname(DBPROCESS * dbprocess, char *language, int daynum);
00489 DBBOOL dbdead(DBPROCESS * dbproc);
00490
00491 #define DBDEAD(x) dbdead((x))
00492 EHANDLEFUNC dberrhandle(EHANDLEFUNC handler);
00493 void dbexit(void);
00494 RETCODE dbfcmd(DBPROCESS * dbproc, const char *fmt, ...);
00495 DBINT dbfirstrow(DBPROCESS * dbproc);
00496
00497 #define DBFIRSTROW(x) dbfirstrow((x))
00498 RETCODE dbfree_xlate(DBPROCESS * dbprocess, DBXLATE * xlt_tosrv, DBXLATE * clt_todisp);
00499 void dbfreebuf(DBPROCESS * dbproc);
00500 void dbfreequal(char *qualptr);
00501 RETCODE dbfreesort(DBPROCESS * dbprocess, DBSORTORDER * sortorder);
00502 char *dbgetchar(DBPROCESS * dbprocess, int n);
00503 char *dbgetcharset(DBPROCESS * dbprocess);
00504 RETCODE dbgetloginfo(DBPROCESS * dbprocess, DBLOGINFO ** loginfo);
00505 int dbgetlusername(LOGINREC * login, BYTE * name_buffer, int buffer_len);
00506 int dbgetmaxprocs(void);
00507 char *dbgetnatlanf(DBPROCESS * dbprocess);
00508 int dbgetoff(DBPROCESS * dbprocess, DBUSMALLINT offtype, int startfrom);
00509 int dbgetpacket(DBPROCESS * dbproc);
00510 RETCODE dbgetrow(DBPROCESS * dbproc, DBINT row);
00511 int DBGETTIME(void);
00512 BYTE *dbgetuserdata(DBPROCESS * dbproc);
00513 DBBOOL dbhasretstat(DBPROCESS * dbproc);
00514 RETCODE dbinit(void);
00515 int dbiordesc(DBPROCESS * dbproc);
00516
00517 #define DBIORDESC(x) dbiordesc((x))
00518 int dbiowdesc(DBPROCESS * dbproc);
00519
00520 #define DBIOWDESC(x) dbiowdesc((x))
00521 DBBOOL dbisavail(DBPROCESS * dbprocess);
00522
00523 #define DBISAVAIL(x) dbisavail((x))
00524 DBBOOL dbisopt(DBPROCESS * dbproc, int option, char *param);
00525 DBINT dblastrow(DBPROCESS * dbproc);
00526
00527 #define DBLASTROW(x) dblastrow((x))
00528 RETCODE dbload_xlate(DBPROCESS * dbprocess, char *srv_charset, char *clt_name, DBXLATE ** xlt_tosrv, DBXLATE ** xlt_todisp);
00529 DBSORTORDER *dbloadsort(DBPROCESS * dbprocess);
00530 LOGINREC *dblogin(void);
00531 void dbloginfree(LOGINREC * login);
00532 RETCODE dbmny4add(DBPROCESS * dbproc, DBMONEY4 * m1, DBMONEY4 * m2, DBMONEY4 * sum);
00533 int dbmny4cmp(DBPROCESS * dbproc, DBMONEY4 * m1, DBMONEY4 * m2);
00534 RETCODE dbmny4copy(DBPROCESS * dbprocess, DBMONEY4 * m1, DBMONEY4 * m2);
00535 RETCODE dbmny4divide(DBPROCESS * dbproc, DBMONEY4 * m1, DBMONEY4 * m2, DBMONEY4 * quotient);
00536 RETCODE dbmny4minus(DBPROCESS * dbproc, DBMONEY4 * src, DBMONEY4 * dest);
00537 RETCODE dbmny4mul(DBPROCESS * dbproc, DBMONEY4 * m1, DBMONEY4 * m2, DBMONEY4 * prod);
00538 RETCODE dbmny4sub(DBPROCESS * dbproc, DBMONEY4 * m1, DBMONEY4 * m2, DBMONEY4 * diff);
00539 RETCODE dbmny4zero(DBPROCESS * dbproc, DBMONEY4 * dest);
00540 RETCODE dbmnyadd(DBPROCESS * dbproc, DBMONEY * m1, DBMONEY * m2, DBMONEY * sum);
00541 int dbmnycmp(DBPROCESS * dbproc, DBMONEY * m1, DBMONEY * m2);
00542 RETCODE dbmnycopy(DBPROCESS * dbproc, DBMONEY * src, DBMONEY * dest);
00543 RETCODE dbmnydec(DBPROCESS * dbproc, DBMONEY * mnyptr);
00544 RETCODE dbmnydivide(DBPROCESS * dbproc, DBMONEY * m1, DBMONEY * m2, DBMONEY * quotient);
00545 RETCODE dbmnydown(DBPROCESS * dbproc, DBMONEY * mnyptr, int divisor, int *remainder);
00546 RETCODE dbmnyinc(DBPROCESS * dbproc, DBMONEY * mnyptr);
00547 RETCODE dbmnyinit(DBPROCESS * dbproc, DBMONEY * mnyptr, int trim, DBBOOL * negative);
00548 RETCODE dbmnymaxneg(DBPROCESS * dbproc, DBMONEY * dest);
00549 RETCODE dbmnyndigit(DBPROCESS * dbproc, DBMONEY * mnyptr, DBCHAR * value, DBBOOL * zero);
00550 RETCODE dbmnymaxpos(DBPROCESS * dbproc, DBMONEY * dest);
00551 RETCODE dbmnyminus(DBPROCESS * dbproc, DBMONEY * src, DBMONEY * dest);
00552 RETCODE dbmnymul(DBPROCESS * dbproc, DBMONEY * m1, DBMONEY * m2, DBMONEY * prod);
00553 RETCODE dbmnydigit(DBPROCESS * dbprocess, DBMONEY * m1, DBCHAR * value, DBBOOL * zero);
00554 RETCODE dbmnyscale(DBPROCESS * dbproc, DBMONEY * dest, int multiplier, int addend);
00555 RETCODE dbmnysub(DBPROCESS * dbproc, DBMONEY * m1, DBMONEY * m2, DBMONEY * diff);
00556 RETCODE dbmnyzero(DBPROCESS * dbproc, DBMONEY * dest);
00557 const char *dbmonthname(DBPROCESS * dbproc, char *language, int monthnum, DBBOOL shortform);
00558 RETCODE dbmorecmds(DBPROCESS * dbproc);
00559
00560 #define DBMORECMDS(x) dbmorecmds((x))
00561 RETCODE dbmoretext(DBPROCESS * dbproc, DBINT size, BYTE * text);
00562 MHANDLEFUNC dbmsghandle(MHANDLEFUNC handler);
00563 char *dbname(DBPROCESS * dbproc);
00564 RETCODE dbnextrow(DBPROCESS * dbproc);
00565 RETCODE dbnpcreate(DBPROCESS * dbprocess);
00566 RETCODE dbnpdefine(DBPROCESS * dbprocess, DBCHAR * procedure_name, DBSMALLINT namelen);
00567 RETCODE dbnullbind(DBPROCESS * dbproc, int column, DBINT * indicator);
00568 int dbnumalts(DBPROCESS * dbproc, int computeid);
00569 int dbnumcols(DBPROCESS * dbproc);
00570 int dbnumcompute(DBPROCESS * dbprocess);
00571 int DBNUMORDERS(DBPROCESS * dbprocess);
00572 int dbnumrets(DBPROCESS * dbproc);
00573 DBPROCESS *tdsdbopen(LOGINREC * login, char *server);
00574 DBPROCESS *dbopen(LOGINREC * login, char *server);
00575
00576 #define dbopen(x,y) tdsdbopen((x),(y))
00577 int dbordercol(DBPROCESS * dbprocess, int order);
00578 RETCODE dbpoll(DBPROCESS * dbproc, long milliseconds, DBPROCESS ** ready_dbproc, int *return_reason);
00579 void dbprhead(DBPROCESS * dbproc);
00580 RETCODE dbprrow(DBPROCESS * dbproc);
00581 const char *dbprtype(int token);
00582 char *dbqual(DBPROCESS * dbprocess, int tabnum, char *tabname);
00583 DBBOOL DRBUF(DBPROCESS * dbprocess);
00584 DBINT dbreadpage(DBPROCESS * dbprocess, char *p_dbname, DBINT pageno, BYTE * buf);
00585 STATUS dbreadtext(DBPROCESS * dbproc, void *buf, DBINT bufsize);
00586 void dbrecftos(char *filename);
00587 RETCODE dbrecvpassthru(DBPROCESS * dbprocess, DBVOIDPTR * bufp);
00588 RETCODE dbregdrop(DBPROCESS * dbprocess, DBCHAR * procnm, DBSMALLINT namelen);
00589 RETCODE dbregexec(DBPROCESS * dbproc, DBUSMALLINT options);
00590 RETCODE dbreghandle(DBPROCESS * dbprocess, DBCHAR * procnm, DBSMALLINT namelen, INTFUNCPTR handler);
00591 RETCODE dbreginit(DBPROCESS * dbproc, DBCHAR * procedure_name, DBSMALLINT namelen);
00592 RETCODE dbreglist(DBPROCESS * dbproc);
00593 RETCODE dbregnowatch(DBPROCESS * dbprocess, DBCHAR * procnm, DBSMALLINT namelen);
00594 RETCODE dbregparam(DBPROCESS * dbproc, char *param_name, int type, DBINT datalen, BYTE * data);
00595 RETCODE dbregwatch(DBPROCESS * dbprocess, DBCHAR * procnm, DBSMALLINT namelen, DBUSMALLINT options);
00596 RETCODE dbregwatchlist(DBPROCESS * dbprocess);
00597 RETCODE dbresults(DBPROCESS * dbproc);
00598 RETCODE dbresults_r(DBPROCESS * dbproc, int recursive);
00599 BYTE *dbretdata(DBPROCESS * dbproc, int retnum);
00600 int dbretlen(DBPROCESS * dbproc, int retnum);
00601 char *dbretname(DBPROCESS * dbproc, int retnum);
00602 DBINT dbretstatus(DBPROCESS * dbproc);
00603 int dbrettype(DBPROCESS * dbproc, int retnum);
00604 RETCODE dbrows(DBPROCESS * dbproc);
00605
00606 #define DBROWS(x) dbrows((x))
00607 STATUS dbrowtype(DBPROCESS * dbprocess);
00608
00609 #define DBROWTYPE(x) dbrowtype((x))
00610 RETCODE dbrpcinit(DBPROCESS * dbproc, char *rpcname, DBSMALLINT options);
00611 RETCODE dbrpcparam(DBPROCESS * dbproc, char *paramname, BYTE status, int type, DBINT maxlen, DBINT datalen, BYTE * value);
00612 RETCODE dbrpcsend(DBPROCESS * dbproc);
00613 void dbrpwclr(LOGINREC * login);
00614 RETCODE dbrpwset(LOGINREC * login, char *srvname, char *password, int pwlen);
00615 RETCODE dbsafestr(DBPROCESS * dbproc, const char *src, DBINT srclen, char *dest, DBINT destlen, int quotetype);
00616 RETCODE *dbsechandle(DBINT type, INTFUNCPTR handler);
00617 RETCODE dbsendpassthru(DBPROCESS * dbprocess, DBVOIDPTR bufp);
00618 char *dbservcharset(DBPROCESS * dbprocess);
00619 void dbsetavail(DBPROCESS * dbprocess);
00620 void dbsetbusy(DBPROCESS * dbprocess, DB_DBBUSY_FUNC busyfunc);
00621 RETCODE dbsetdefcharset(char *charset);
00622 RETCODE dbsetdeflang(char *language);
00623 void dbsetidle(DBPROCESS * dbprocess, DB_DBIDLE_FUNC idlefunc);
00624 void dbsetifile(char *filename);
00625 void dbsetinterrupt(DBPROCESS * dbproc, DB_DBCHKINTR_FUNC chkintr, DB_DBHNDLINTR_FUNC hndlintr);
00626 RETCODE dbsetloginfo(LOGINREC * loginrec, DBLOGINFO * loginfo);
00627 RETCODE dbsetlogintime(int seconds);
00628 RETCODE dbsetmaxprocs(int maxprocs);
00629 RETCODE dbsetnull(DBPROCESS * dbprocess, int bindtype, int bindlen, BYTE * bindval);
00630 RETCODE dbsetopt(DBPROCESS * dbproc, int option, const char *char_param, int int_param);
00631 STATUS dbsetrow(DBPROCESS * dbprocess, DBINT row);
00632 RETCODE dbsettime(int seconds);
00633 void dbsetuserdata(DBPROCESS * dbproc, BYTE * ptr);
00634 RETCODE dbsetversion(DBINT version);
00635
00636
00637 #define DBSETLVERSION(login, version) dbsetversion((version))
00638 int dbspid(DBPROCESS * dbproc);
00639 RETCODE dbspr1row(DBPROCESS * dbproc, char *buffer, DBINT buf_len);
00640 DBINT dbspr1rowlen(DBPROCESS * dbproc);
00641 RETCODE dbsprhead(DBPROCESS * dbproc, char *buffer, DBINT buf_len);
00642 RETCODE dbsprline(DBPROCESS * dbproc, char *buffer, DBINT buf_len, DBCHAR line_char);
00643 RETCODE dbsqlexec(DBPROCESS * dbproc);
00644 RETCODE dbsqlok(DBPROCESS * dbproc);
00645 RETCODE dbsqlsend(DBPROCESS * dbproc);
00646 int dbstrbuild(DBPROCESS * dbproc, char *charbuf, int bufsize, char *text, char *formats, ...);
00647 int dbstrcmp(DBPROCESS * dbprocess, char *s1, int l1, char *s2, int l2, DBSORTORDER * sort);
00648 RETCODE dbstrcpy(DBPROCESS * dbproc, int start, int numbytes, char *dest);
00649 int dbstrlen(DBPROCESS * dbproc);
00650 int dbstrsort(DBPROCESS * dbprocess, char *s1, int l1, char *s2, int l2, DBSORTORDER * sort);
00651 DBBOOL dbtabbrowse(DBPROCESS * dbprocess, int tabnum);
00652 int dbtabcount(DBPROCESS * dbprocess);
00653 char *dbtabname(DBPROCESS * dbprocess, int tabnum);
00654 char *dbtabsoruce(DBPROCESS * dbprocess, int colnum, int *tabnum);
00655 DBINT dbvarylen(DBPROCESS * dbproc, int column);
00656
00657 #define SYBEICONVI 2403
00658 #define SYBEICONVO 2402
00659 #define SYBESYNC 20001
00660 #define SYBEFCON 20002
00661 #define SYBETIME 20003
00662 #define SYBEREAD 20004
00663 #define SYBEBUFL 20005
00664 #define SYBEWRIT 20006
00665 #define SYBEVMS 20007
00666 #define SYBESOCK 20008
00667 #define SYBECONN 20009
00668 #define SYBEMEM 20010
00669 #define SYBEDBPS 20011
00670 #define SYBEINTF 20012
00671 #define SYBEUHST 20013
00672 #define SYBEPWD 20014
00673 #define SYBEOPIN 20015
00674 #define SYBEINLN 20016
00675 #define SYBESEOF 20017
00676 #define SYBESMSG 20018
00677 #define SYBERPND 20019
00678 #define SYBEBTOK 20020
00679 #define SYBEITIM 20021
00680 #define SYBEOOB 20022
00681 #define SYBEBTYP 20023
00682 #define SYBEBNCR 20024
00683 #define SYBEIICL 20025
00684 #define SYBECNOR 20026
00685 #define SYBENPRM 20027
00686 #define SYBEUVDT 20028
00687 #define SYBEUFDT 20029
00688 #define SYBEWAID 20030
00689 #define SYBECDNS 20031
00690 #define SYBEABNC 20032
00691 #define SYBEABMT 20033
00692 #define SYBEABNP 20034
00693 #define SYBEAAMT 20035
00694 #define SYBENXID 20036
00695 #define SYBERXID 20037
00696 #define SYBEICN 20038
00697 #define SYBENMOB 20039
00698 #define SYBEAPUT 20040
00699 #define SYBEASNL 20041
00700 #define SYBENTLL 20042
00701 #define SYBEASUL 20043
00702 #define SYBERDNR 20044
00703 #define SYBENSIP 20045
00704 #define SYBEABNV 20046
00705 #define SYBEDDNE 20047
00706 #define SYBECUFL 20048
00707 #define SYBECOFL 20049
00708 #define SYBECSYN 20050
00709 #define SYBECLPR 20051
00710 #define SYBECNOV 20052
00711 #define SYBERDCN 20053
00712 #define SYBESFOV 20054
00713 #define SYBEUNT 20055
00714 #define SYBECLOS 20056
00715 #define SYBEUAVE 20057
00716 #define SYBEUSCT 20058
00717 #define SYBEEQVA 20059
00718 #define SYBEUDTY 20060
00719 #define SYBETSIT 20061
00720 #define SYBEAUTN 20062
00721 #define SYBEBDIO 20063
00722 #define SYBEBCNT 20064
00723 #define SYBEIFNB 20065
00724 #define SYBETTS 20066
00725 #define SYBEKBCO 20067
00726 #define SYBEBBCI 20068
00727 #define SYBEKBCI 20069
00728 #define SYBEBCRE 20070
00729 #define SYBETPTN 20071
00730 #define SYBEBCWE 20072
00731 #define SYBEBCNN 20073
00732 #define SYBEBCOR 20074
00733 #define SYBEBCIS 20075
00734 #define SYBEBCPI 20076
00735 #define SYBEBCPN 20077
00736 #define SYBEBCPB 20078
00737 #define SYBEVDPT 20079
00738 #define SYBEBIVI 20080
00739 #define SYBEBCBC 20081
00740 #define SYBEBCFO 20082
00741 #define SYBEBCVH 20083
00742 #define SYBEBCUO 20084
00743 #define SYBEBCUC 20085
00744 #define SYBEBUOE 20086
00745 #define SYBEBUCE 20087
00746 #define SYBEBWEF 20088
00747 #define SYBEASTF 20089
00748 #define SYBEUACS 20090
00749 #define SYBEASEC 20091
00750 #define SYBETMTD 20092
00751 #define SYBENTTN 20093
00752 #define SYBEDNTI 20094
00753 #define SYBEBTMT 20095
00754 #define SYBEORPF 20096
00755 #define SYBEUVBF 20097
00756 #define SYBEBUOF 20098
00757 #define SYBEBUCF 20099
00758 #define SYBEBRFF 20100
00759 #define SYBEBWFF 20101
00760 #define SYBEBUDF 20102
00761 #define SYBEBIHC 20103
00762 #define SYBEBEOF 20104
00763 #define SYBEBCNL 20105
00764 #define SYBEBCSI 20106
00765 #define SYBEBCIT 20107
00766 #define SYBEBCSA 20108
00767 #define SYBENULL 20109
00768 #define SYBEUNAM 20110
00769 #define SYBEBCRO 20111
00770 #define SYBEMPLL 20112
00771 #define SYBERPIL 20113
00772 #define SYBERPUL 20114
00773 #define SYBEUNOP 20115
00774 #define SYBECRNC 20116
00775 #define SYBERTCC 20117
00776 #define SYBERTSC 20118
00777 #define SYBEUCRR 20119
00778 #define SYBERPNA 20120
00779 #define SYBEOPNA 20121
00780 #define SYBEFGTL 20122
00781 #define SYBECWLL 20123
00782 #define SYBEUFDS 20124
00783 #define SYBEUCPT 20125
00784 #define SYBETMCF 20126
00785 #define SYBEAICF 20127
00786 #define SYBEADST 20128
00787 #define SYBEALTT 20129
00788 #define SYBEAPCT 20130
00789 #define SYBEXOCI 20131
00790 #define SYBEFSHD 20132
00791 #define SYBEAOLF 20133
00792 #define SYBEARDI 20134
00793 #define SYBEURCI 20135
00794 #define SYBEARDL 20136
00795 #define SYBEURMI 20137
00796 #define SYBEUREM 20138
00797 #define SYBEURES 20139
00798 #define SYBEUREI 20140
00799 #define SYBEOREN 20141
00800 #define SYBEISOI 20142
00801 #define SYBEIDCL 20143
00802 #define SYBEIMCL 20144
00803 #define SYBEIFCL 20145
00804 #define SYBEUTDS 20146
00805 #define SYBEBUFF 20147
00806 #define SYBEACNV 20148
00807 #define SYBEDPOR 20149
00808 #define SYBENDC 20150
00809 #define SYBEMVOR 20151
00810 #define SYBEDVOR 20152
00811 #define SYBENBVP 20153
00812 #define SYBESPID 20154
00813 #define SYBENDTP 20155
00814 #define SYBEXTN 20156
00815 #define SYBEXTDN 20157
00816 #define SYBEXTSN 20158
00817 #define SYBENUM 20159
00818 #define SYBETYPE 20160
00819 #define SYBEGENOS 20161
00820 #define SYBEPAGE 20162
00821 #define SYBEOPTNO 20163
00822 #define SYBEETD 20164
00823 #define SYBERTYPE 20165
00824 #define SYBERFILE 20166
00825 #define SYBEFMODE 20167
00826 #define SYBESLCT 20168
00827 #define SYBEZTXT 20169
00828 #define SYBENTST 20170
00829 #define SYBEOSSL 20171
00830 #define SYBEESSL 20172
00831 #define SYBENLNL 20173
00832 #define SYBENHAN 20174
00833 #define SYBENBUF 20175
00834 #define SYBENULP 20176
00835 #define SYBENOTI 20177
00836 #define SYBEEVOP 20178
00837 #define SYBENEHA 20179
00838 #define SYBETRAN 20180
00839 #define SYBEEVST 20181
00840 #define SYBEEINI 20182
00841 #define SYBEECRT 20183
00842 #define SYBEECAN 20184
00843 #define SYBEEUNR 20185
00844 #define SYBERPCS 20186
00845 #define SYBETPAR 20187
00846 #define SYBETEXS 20188
00847 #define SYBETRAC 20189
00848 #define SYBETRAS 20190
00849 #define SYBEPRTF 20191
00850 #define SYBETRSN 20192
00851 #define SYBEBPKS 20193
00852 #define SYBEIPV 20194
00853 #define SYBEMOV 20195
00854 #define SYBEDIVZ 20196
00855 #define SYBEASTL 20197
00856 #define SYBESEFA 20198
00857 #define SYBEPOLL 20199
00858 #define SYBENOEV 20200
00859 #define SYBEBADPK 20201
00860 #define SYBESECURE 20202
00861 #define SYBECAP 20203
00862 #define SYBEFUNC 20204
00863 #define SYBERESP 20205
00864 #define SYBEIVERS 20206
00865 #define SYBEONCE 20207
00866 #define SYBERPNULL 20208
00867 #define SYBERPTXTIM 20209
00868 #define SYBENEG 20210
00869 #define SYBELBLEN 20211
00870 #define SYBEUMSG 20212
00871 #define SYBECAPTYP 20213
00872 #define SYBEBNUM 20214
00873 #define SYBEBBL 20215
00874 #define SYBEBPREC 20216
00875 #define SYBEBSCALE 20217
00876 #define SYBECDOMAIN 20218
00877 #define SYBECINTERNAL 20219
00878 #define SYBEBTYPSRV 20220
00879 #define SYBEBCSET 20221
00880 #define SYBEFENC 20222
00881 #define SYBEFRES 20223
00882 #define SYBEISRVPREC 20224
00883 #define SYBEISRVSCL 20225
00884 #define SYBEINUMCL 20226
00885 #define SYBEIDECCL 20227
00886 #define SYBEBCMTXT 20228
00887 #define SYBEBCPREC 20229
00888 #define SYBEBCBNPR 20230
00889 #define SYBEBCBNTYP 20231
00890 #define SYBEBCSNTYP 20232
00891 #define SYBEBCPCTYP 20233
00892 #define SYBEBCVLEN 20234
00893 #define SYBEBCHLEN 20235
00894 #define SYBEBCBPREF 20236
00895 #define SYBEBCPREF 20237
00896 #define SYBEBCITBNM 20238
00897 #define SYBEBCITBLEN 20239
00898 #define SYBEBCSNDROW 20240
00899 #define SYBEBPROCOL 20241
00900 #define SYBEBPRODEF 20242
00901 #define SYBEBPRONUMDEF 20243
00902 #define SYBEBPRODEFID 20244
00903 #define SYBEBPRONODEF 20245
00904 #define SYBEBPRODEFTYP 20246
00905 #define SYBEBPROEXTDEF 20247
00906 #define SYBEBPROEXTRES 20248
00907 #define SYBEBPROBADDEF 20249
00908 #define SYBEBPROBADTYP 20250
00909 #define SYBEBPROBADLEN 20251
00910 #define SYBEBPROBADPREC 20252
00911 #define SYBEBPROBADSCL 20253
00912 #define SYBEBADTYPE 20254
00913 #define SYBECRSNORES 20255
00914 #define SYBECRSNOIND 20256
00915 #define SYBECRSVIEW 20257
00916 #define SYBECRSVIIND 20258
00917 #define SYBECRSORD 20259
00918 #define SYBECRSBUFR 20260
00919 #define SYBECRSNOFREE 20261
00920 #define SYBECRSDIS 20262
00921 #define SYBECRSAGR 20263
00922 #define SYBECRSFRAND 20264
00923 #define SYBECRSFLAST 20265
00924 #define SYBECRSBROL 20266
00925 #define SYBECRSFROWN 20267
00926 #define SYBECRSBSKEY 20268
00927 #define SYBECRSRO 20269
00928 #define SYBECRSNOCOUNT 20270
00929 #define SYBECRSTAB 20271
00930 #define SYBECRSUPDNB 20272
00931 #define SYBECRSNOWHERE 20273
00932 #define SYBECRSSET 20274
00933 #define SYBECRSUPDTAB 20275
00934 #define SYBECRSNOUPD 20276
00935 #define SYBECRSINV 20277
00936 #define SYBECRSNOKEYS 20278
00937 #define SYBECRSNOBIND 20279
00938 #define SYBECRSFTYPE 20280
00939 #define SYBECRSINVALID 20281
00940 #define SYBECRSMROWS 20282
00941 #define SYBECRSNROWS 20283
00942 #define SYBECRSNOLEN 20284
00943 #define SYBECRSNOPTCC 20285
00944 #define SYBECRSNORDER 20286
00945 #define SYBECRSNOTABLE 20287
00946 #define SYBECRSNUNIQUE 20288
00947 #define SYBECRSVAR 20289
00948 #define SYBENOVALUE 20290
00949 #define SYBEVOIDRET 20291
00950 #define SYBECLOSEIN 20292
00951 #define SYBEBOOL 20293
00952 #define SYBEBCPOPT 20294
00953 #define SYBEERRLABEL 20295
00954 #define SYBEATTNACK 20296
00955 #define SYBEBBFL 20297
00956 #define SYBEDCL 20298
00957 #define SYBECS 20299
00958
00959 int dbtds(DBPROCESS * dbprocess);
00960
00961 #define DBTDS(a) dbtds(a)
00962 DBINT dbtextsize(DBPROCESS * dbprocess);
00963 int dbtsnewlen(DBPROCESS * dbprocess);
00964 DBBINARY *dbtsnewval(DBPROCESS * dbprocess);
00965 RETCODE dbtsput(DBPROCESS * dbprocess, DBBINARY * newts, int newtslen, int tabnum, char *tabname);
00966 DBBINARY *dbtxptr(DBPROCESS * dbproc, int column);
00967 DBBINARY *dbtxtimestamp(DBPROCESS * dbproc, int column);
00968 DBBINARY *dbtxtsnewval(DBPROCESS * dbprocess);
00969 RETCODE dbtxtsput(DBPROCESS * dbprocess, DBBINARY newtxts, int colnum);
00970 RETCODE dbuse(DBPROCESS * dbproc, char *name);
00971 DBBOOL dbcarylen(DBPROCESS * dbprocess, int column);
00972 const char *dbversion(void);
00973 DBBOOL dbwillconvert(int srctype, int desttype);
00974 RETCODE dbwritepage(DBPROCESS * dbprocess, char *p_dbname, DBINT pageno, DBINT size, BYTE * buf);
00975 RETCODE dbwritetext(DBPROCESS * dbproc, char *objname, DBBINARY * textptr, DBTINYINT textptrlen, DBBINARY * timestamp,
00976 DBBOOL log, DBINT size, BYTE * text);
00977 int dbxlate(DBPROCESS * dbprocess, char *src, int srclen, char *dest, int destlen, DBXLATE * xlt, int *srcbytes_used,
00978 DBBOOL srcend, int status);
00979
00980
00981 RETCODE dbsetlname(LOGINREC * login, const char *value, int which);
00982 RETCODE dbsetlbool(LOGINREC * login, int value, int which);
00983 RETCODE dbsetlshort(LOGINREC * login, int value, int which);
00984 RETCODE dbsetllong(LOGINREC * login, long value, int which);
00985
00986 #define DBSETHOST 1
00987 #define DBSETLHOST(x,y) dbsetlname((x), (y), DBSETHOST)
00988 #define DBSETUSER 2
00989 #define DBSETLUSER(x,y) dbsetlname((x), (y), DBSETUSER)
00990 #define DBSETPWD 3
00991 #define DBSETLPWD(x,y) dbsetlname((x), (y), DBSETPWD)
00992 #define DBSETHID 4
00993 #define DBSETLHID(x,y) dbsetlname((x), (y), DBSETHID)
00994 #define DBSETAPP 5
00995 #define DBSETLAPP(x,y) dbsetlname((x), (y), DBSETAPP)
00996 #define DBSETBCP 6
00997 #define BCP_SETL(x,y) dbsetlbool((x), (y), DBSETBCP)
00998 #define DBSETNATLANG 7
00999 #define DBSETLNATLANG(x,y) dbsetlname((x), (y), DBSETNATLANG)
01000 #define DBSETNOSHORT 8
01001 #define DBSETLNOSHORT(x,y) dbsetlbool((x), (y), DBSETNOSHORT)
01002 #define DBSETHIER 9
01003 #define DBSETLHIER(x,y) dbsetlshort((x), (y), DBSETHIER)
01004 #define DBSETCHARSET 10
01005 #define DBSETLCHARSET(x,y) dbsetlname((x), (y), DBSETCHARSET)
01006 #define DBSETPACKET 11
01007 #define DBSETLPACKET(x,y) dbsetllong((x), (y), DBSETPACKET)
01008 #define DBSETENCRYPT 12
01009 #define DBSETLENCRYPT(x,y) dbsetlbool((x), (y), DBSETENCRYPT)
01010 #define DBSETLABELED 13
01011 #define DBSETLLABELED(x,y) dbsetlbool((x), (y), DBSETLABELED)
01012 #define BCP_SETLABELED(x,y) dbsetlbool((x), (y), DBSETLABELED)
01013
01014 RETCODE bcp_init(DBPROCESS * dbproc, const char *tblname, const char *hfile, const char *errfile, int direction);
01015 RETCODE bcp_done(DBPROCESS * dbproc);
01016
01017 RETCODE bcp_batch(DBPROCESS * dbproc);
01018 RETCODE bcp_bind(DBPROCESS * dbproc, BYTE * varaddr, int prefixlen, DBINT varlen, BYTE * terminator, int termlen, int type,
01019 int table_column);
01020 RETCODE bcp_collen(DBPROCESS * dbproc, DBINT varlen, int table_column);
01021 RETCODE bcp_columns(DBPROCESS * dbproc, int host_colcount);
01022 RETCODE bcp_colfmt(DBPROCESS * dbproc, int host_column, int host_type, int host_prefixlen, DBINT host_collen,
01023 const BYTE * host_term, int host_termlen, int colnum);
01024 RETCODE bcp_colfmt_ps(DBPROCESS * dbproc, int host_column, int host_type, int host_prefixlen, DBINT host_collen,
01025 BYTE * host_term, int host_termlen, int colnum, DBTYPEINFO * typeinfo);
01026 RETCODE bcp_colptr(DBPROCESS * dbproc, BYTE * colptr, int table_column);
01027 RETCODE bcp_control(DBPROCESS * dbproc, int field, DBINT value);
01028 RETCODE bcp_exec(DBPROCESS * dbproc, DBINT * rows_copied);
01029 DBBOOL bcp_getl(LOGINREC * login);
01030 RETCODE bcp_moretext(DBPROCESS * dbproc, DBINT size, BYTE * text);
01031 RETCODE bcp_options(DBPROCESS * dbproc, int option, BYTE * value, int valuelen);
01032 RETCODE bcp_readfmt(DBPROCESS * dbproc, char *filename);
01033 RETCODE bcp_sendrow(DBPROCESS * dbproc);
01034 RETCODE bcp_writefmt(DBPROCESS * dbproc, char *filename);
01035
01036 void build_xact_string(char *xact_name, char *service_name, DBINT commid, char *result);
01037 RETCODE remove_xact(DBPROCESS * connect, DBINT commid, int n);
01038 RETCODE abort_xact(DBPROCESS * connect, DBINT commid);
01039 void close_commit(DBPROCESS * connect);
01040 RETCODE commit_xact(DBPROCESS * connect, DBINT commid);
01041 DBPROCESS *open_commit(LOGINREC * login, char *servername);
01042 RETCODE scan_xact(DBPROCESS * connect, DBINT commid);
01043 DBINT start_xact(DBPROCESS * connect, char *application_name, char *xact_name, int site_count);
01044 DBINT stat_xact(DBPROCESS * connect, DBINT commid);
01045
01046 #ifdef __cplusplus
01047 #if 0
01048 {
01049 #endif
01050 }
01051 #endif
01052
01053 #endif