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