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