31 #include "tds_sysdep_public.h"
33 #undef TDS_STATIC_CAST
35 #define TDS_STATIC_CAST(type, a) static_cast<type>(a)
42 #define TDS_STATIC_CAST(type, a) ((type)(a))
45 static const char rcsid_sybdb_h[] =
"$Id: sybdb.h,v 1.100.2.1 2011-06-06 12:31:45 freddy77 Exp $";
46 static const void *
const no_unused_sybdb_h_warn[] = { rcsid_sybdb_h, no_unused_sybdb_h_warn };
62 #define INT_CONTINUE 1
66 #define DBMAXNUMLEN 33
72 #define DBVERSION_UNKNOWN 0
73 #define DBVERSION_46 1
74 #define DBVERSION_100 2
75 #define DBVERSION_42 3
76 #define DBVERSION_70 4
77 #define DBVERSION_71 5
78 #define DBVERSION_80 DBVERSION_71
79 #define DBVERSION_72 6
82 #define DBVER42 DBVERSION_42
83 #define DBVER60 DBVERSION_70
89 #define DBTDS_UNKNOWN 0
109 #define BCPKEEPIDENTITY 8
120 typedef void DBCURSOR;
121 typedef void DBXLATE;
122 typedef void DBSORTORDER;
123 typedef void DBLOGINFO;
124 typedef void *DBVOIDPTR;
126 typedef unsigned short USHORT;
127 typedef int (*INTFUNCPTR) (
void *, ...);
128 typedef int (*DBWAITFUNC) (void);
129 typedef DBWAITFUNC(*DB_DBBUSY_FUNC) (
void *dbproc);
130 typedef void (*DB_DBIDLE_FUNC) (DBWAITFUNC dfunc,
void *dbproc);
131 typedef int (*DB_DBCHKINTR_FUNC) (
void *dbproc);
132 typedef int (*DB_DBHNDLINTR_FUNC) (
void *dbproc);
134 #ifndef __INCvxWorksh
146 #if !defined(_WINDEF_) && !defined(_WINDEF_H) && !defined(DOS32X)
151 #if !defined(_FREETDS_LIBRARY_SOURCE) || !defined(_tds_h_)
157 #define SYBCHAR SYBCHAR
159 #define SYBVARCHAR SYBVARCHAR
161 #define SYBINTN SYBINTN
163 #define SYBINT1 SYBINT1
165 #define SYBINT2 SYBINT2
167 #define SYBINT4 SYBINT4
169 #define SYBINT8 SYBINT8
171 #define SYBFLT8 SYBFLT8
173 #define SYBDATETIME SYBDATETIME
175 #define SYBBIT SYBBIT
177 #define SYBBITN SYBBITN
179 #define SYBTEXT SYBTEXT
181 #define SYBNTEXT SYBNTEXT
183 #define SYBIMAGE SYBIMAGE
185 #define SYBMONEY4 SYBMONEY4
187 #define SYBMONEY SYBMONEY
189 #define SYBDATETIME4 SYBDATETIME4
191 #define SYBREAL SYBREAL
193 #define SYBBINARY SYBBINARY
195 #define SYBVOID SYBVOID
197 #define SYBVARBINARY SYBVARBINARY
199 #define SYBNUMERIC SYBNUMERIC
201 #define SYBDECIMAL SYBDECIMAL
203 #define SYBFLTN SYBFLTN
205 #define SYBMONEYN SYBMONEYN
207 #define SYBDATETIMN SYBDATETIMN
209 #define SYBNVARCHAR SYBNVARCHAR
212 #define SYBAOPCNT 0x4b
213 #define SYBAOPCNTU 0x4c
214 #define SYBAOPSUM 0x4d
215 #define SYBAOPSUMU 0x4e
216 #define SYBAOPAVG 0x4f
217 #define SYBAOPAVGU 0x50
218 #define SYBAOPMIN 0x51
219 #define SYBAOPMAX 0x52
222 #define SYBAOPCNT_BIG 0x09
223 #define SYBAOPSTDEV 0x30
224 #define SYBAOPSTDEVP 0x31
225 #define SYBAOPVAR 0x32
226 #define SYBAOPVARP 0x33
227 #define SYBAOPCHECKSUM_AGG 0x72
231 typedef unsigned char DBBOOL;
233 typedef unsigned char DBBIT;
234 typedef unsigned char DBTINYINT;
235 typedef tds_sysdep_int16_type DBSMALLINT;
236 typedef tds_sysdep_int32_type DBINT;
237 typedef tds_sysdep_int64_type DBBIGINT;
238 typedef unsigned char DBBINARY;
239 typedef tds_sysdep_real32_type DBREAL;
240 typedef tds_sysdep_real64_type DBFLT8;
241 typedef unsigned tds_sysdep_int16_type DBUSMALLINT;
252 unsigned char array[256];
257 unsigned char precision;
259 unsigned char array[33];
267 unsigned tds_sysdep_int32_type mnylow;
288 # define SQLCHAR SYBCHAR
299 typedef unsigned char BYTE;
318 { MAXCOLNAMELEN = 512 };
319 typedef enum { CI_REGULAR=1, CI_ALTERNATE=2, CI_CURSOR=3 } CI_TYPE;
324 DBCHAR Name[MAXCOLNAMELEN+2];
325 DBCHAR ActualName[MAXCOLNAMELEN+2];
326 DBCHAR TableName[MAXCOLNAMELEN+2];
344 #define DBPARSEONLY 0
348 #define DBARITHIGNORE 4
350 #define DBARITHABORT 6
351 #define DBTEXTLIMIT 7
357 #define DBSTORPROCID 13
359 #define DBNOAUTOFREE 15
360 #define DBROWCOUNT 16
361 #define DBTEXTSIZE 17
363 #define DBDATEFORMAT 19
365 #define DBPRCOLSEP 21
366 #define DBPRLINELEN 22
367 #define DBPRLINESEP 23
368 #define DBLFCONVERT 24
369 #define DBDATEFIRST 25
370 #define DBCHAINXACTS 26
371 #define DBFIPSFLAG 27
372 #define DBISOLATION 28
374 #define DBIDENTITY 30
376 #define DBDATESHORT 32
377 #define DBCLIENTCURSORS 33
379 #define DBQUOTEDIDENT 35
381 #define DBNUMOPTIONS 36
389 #define NOSUCHOPTION 2
391 #define MAXOPTTEXT 32
441 typedef int (*EHANDLEFUNC) (
DBPROCESS * dbproc,
int severity,
int dberr,
int oserr,
char *dberrstr,
char *oserrstr);
443 typedef int (*MHANDLEFUNC) (
DBPROCESS * dbproc, DBINT msgno,
int msgstate,
int severity,
char *msgtext,
char *srvname,
444 char *proc,
int line);
448 #define DBNOTIFICATION 2
450 #define DBINTERRUPT 4
458 #define NTBSTRINGBIND 2
459 #define VARYCHARBIND 3
460 #define VARYBINBIND 4
466 #define DATETIMEBIND 11
467 #define SMALLDATETIMEBIND 12
469 #define SMALLMONEYBIND 14
470 #define BINARYBIND 15
472 #define NUMERICBIND 17
473 #define DECIMALBIND 18
474 #define BIGINTBIND 30
475 #define MAXBINDTYPES 31
477 #define DBPRCOLSEP 21
478 #define DBPRLINELEN 22
479 #define DBRPCRETURN 1
480 #define DBRPCDEFAULT 2
484 #define NO_MORE_ROWS -2
486 #define NO_MORE_RESULTS 2
492 #define DB_QUERYOUT 3
499 #define DBRPCRECOMPILE TDS_STATIC_CAST(DBSMALLINT, 0x0001)
500 #define DBRPCRESET TDS_STATIC_CAST(DBSMALLINT, 0x0002)
501 #define DBRPCCURSOR TDS_STATIC_CAST(DBSMALLINT, 0x0008)
503 #if defined(DBLIB_UNIMPLEMENTED)
504 DBBOOL db12hour(
DBPROCESS * dbprocess,
const char language[]);
506 DBBOOL dbcolbrowse(
DBPROCESS * dbprocess,
int colnum);
508 RETCODE dbcursor(DBCURSOR * hc, DBINT optype, DBINT bufno, BYTE * table, BYTE * values);
509 RETCODE dbcursorbind(DBCURSOR * hc,
int col,
int vartype, DBINT varlen, DBINT * poutlen, BYTE * pvaraddr,
DBTYPEINFO * typeinfo);
510 void dbcursorclose(DBCURSOR * hc);
511 RETCODE dbcursorcolinfo(DBCURSOR * hc, DBINT column, DBCHAR * colname, DBINT * coltype, DBINT * collen, DBINT * usertype);
512 RETCODE dbcursorfetch(DBCURSOR * hc, DBINT fetchtype, DBINT rownum);
513 RETCODE dbcursorinfo(DBCURSOR * hc, DBINT * ncols, DBINT * nrows);
514 DBCURSOR *dbcursoropen(
DBPROCESS * dbprocess, BYTE * stmt, SHORT scollopt, SHORT concuropt, USHORT nrows, DBINT * pstatus);
518 RETCODE dbdatechar(
DBPROCESS * dbprocess,
char *buf,
int datepart,
int value);
520 char *dateorder(
DBPROCESS * dbprocess,
char *language);
523 char *dbdayname(
DBPROCESS * dbprocess,
char *language,
int daynum);
525 int dbgetoff(
DBPROCESS * dbprocess, DBUSMALLINT offtype,
int startfrom);
527 char *dbqual(
DBPROCESS * dbprocess,
int tabnum,
char *tabname);
528 void dbfreequal(
char *qualptr);
530 DBSORTORDER *dbloadsort(
DBPROCESS * dbprocess);
531 RETCODE dbfreesort(
DBPROCESS * dbprocess, DBSORTORDER * sortorder);
533 RETCODE dbload_xlate(
DBPROCESS * dbprocess,
char *srv_charset,
char *clt_name, DBXLATE ** xlt_tosrv, DBXLATE ** xlt_todisp);
539 RETCODE dbmnydown(
DBPROCESS * dbproc,
DBMONEY * mnyptr,
int divisor,
int *remainder);
540 RETCODE dbmnyinit(
DBPROCESS * dbproc,
DBMONEY * mnyptr,
int trim, DBBOOL * negative);
541 RETCODE dbmnyndigit(
DBPROCESS * dbproc,
DBMONEY * mnyptr, DBCHAR * value, DBBOOL * zero);
543 RETCODE dbmnydigit(
DBPROCESS * dbprocess,
DBMONEY * m1, DBCHAR * value, DBBOOL * zero);
544 RETCODE dbmnyscale(
DBPROCESS * dbproc,
DBMONEY * dest,
int multiplier,
int addend);
547 RETCODE dbnpcreate(
DBPROCESS * dbprocess);
548 RETCODE dbnpdefine(
DBPROCESS * dbprocess, DBCHAR * procedure_name, DBSMALLINT namelen);
552 RETCODE dbpoll(
DBPROCESS * dbproc,
long milliseconds,
DBPROCESS ** ready_dbproc,
int *return_reason);
553 int dbordercol(
DBPROCESS * dbprocess,
int order);
555 RETCODE dbregdrop(
DBPROCESS * dbprocess, DBCHAR * procnm, DBSMALLINT namelen);
556 RETCODE dbregexec(
DBPROCESS * dbproc, DBUSMALLINT options);
557 RETCODE dbreghandle(
DBPROCESS * dbprocess, DBCHAR * procnm, DBSMALLINT namelen, INTFUNCPTR handler);
558 RETCODE dbreginit(
DBPROCESS * dbproc, DBCHAR * procedure_name, DBSMALLINT namelen);
560 RETCODE dbregnowatch(
DBPROCESS * dbprocess, DBCHAR * procnm, DBSMALLINT namelen);
561 RETCODE dbregparam(
DBPROCESS * dbproc,
char *param_name,
int type, DBINT datalen, BYTE * data);
562 RETCODE dbregwatch(
DBPROCESS * dbprocess, DBCHAR * procnm, DBSMALLINT namelen, DBUSMALLINT options);
563 RETCODE dbregwatchlist(
DBPROCESS * dbprocess);
566 RETCODE dbrpwset(
LOGINREC * login,
char *srvname,
char *password,
int pwlen);
568 DBINT dbreadpage(
DBPROCESS * dbprocess,
char *p_dbname, DBINT pageno, BYTE * buf);
569 RETCODE dbwritepage(
DBPROCESS * dbprocess,
char *p_dbname, DBINT pageno, DBINT size, BYTE * buf);
571 RETCODE dbsetdeflang(
char *language);
573 int dbstrcmp(
DBPROCESS * dbprocess,
char *s1,
int l1,
char *s2,
int l2, DBSORTORDER * sort);
574 int dbstrsort(
DBPROCESS * dbprocess,
char *s1,
int l1,
char *s2,
int l2, DBSORTORDER * sort);
576 DBBOOL dbtabbrowse(
DBPROCESS * dbprocess,
int tabnum);
578 char *dbtabname(
DBPROCESS * dbprocess,
int tabnum);
579 char *dbtabsoruce(
DBPROCESS * dbprocess,
int colnum,
int *tabnum);
581 RETCODE dbsetlshort(
LOGINREC * login,
int value,
int which);
583 RETCODE dbsendpassthru(
DBPROCESS * dbprocess, DBVOIDPTR bufp);
584 RETCODE dbrecvpassthru(
DBPROCESS * dbprocess, DBVOIDPTR * bufp);
586 RETCODE dbgetloginfo(
DBPROCESS * dbprocess, DBLOGINFO ** loginfo);
587 RETCODE dbsetloginfo(
LOGINREC * loginrec, DBLOGINFO * loginfo);
590 DBBINARY *dbtsnewval(
DBPROCESS * dbprocess);
591 RETCODE dbtsput(
DBPROCESS * dbprocess, DBBINARY * newts,
int newtslen,
int tabnum,
char *tabname);
593 RETCODE dbfree_xlate(
DBPROCESS * dbprocess, DBXLATE * xlt_tosrv, DBXLATE * clt_todisp);
594 int dbxlate(
DBPROCESS * dbprocess,
char *src,
int srclen,
char *dest,
int destlen, DBXLATE * xlt,
int *srcbytes_used,
595 DBBOOL srcend,
int status);
597 RETCODE bcp_moretext(
DBPROCESS * dbproc, DBINT size, BYTE * text);
598 RETCODE bcp_writefmt(
DBPROCESS * dbproc,
const char filename[]);
600 void build_xact_string(
char *xact_name,
char *service_name, DBINT commid,
char *result);
601 RETCODE remove_xact(
DBPROCESS * connect, DBINT commid,
int n);
602 RETCODE abort_xact(
DBPROCESS * connect, DBINT commid);
604 RETCODE commit_xact(
DBPROCESS * connect, DBINT commid);
606 RETCODE scan_xact(
DBPROCESS * connect, DBINT commid);
607 DBINT start_xact(
DBPROCESS * connect,
char *application_name,
char *xact_name,
int site_count);
608 DBINT stat_xact(
DBPROCESS * connect, DBINT commid);
614 RETCODE
dbaltbind(
DBPROCESS * dbprocess,
int computeid,
int column,
int vartype, DBINT varlen, BYTE * varaddr);
615 RETCODE dbaltbind_ps(
DBPROCESS * dbprocess,
int computeid,
int column,
int vartype, DBINT varlen, BYTE * varaddr,
623 RETCODE
dbbind(
DBPROCESS * dbproc,
int column,
int vartype, DBINT varlen, BYTE * varaddr);
624 RETCODE dbbind_ps(
DBPROCESS * dbprocess,
int column,
int vartype, DBINT varlen, BYTE * varaddr,
DBTYPEINFO * typeinfo);
630 DBBOOL dbcharsetconv(
DBPROCESS * dbprocess);
637 #define DBCMDROW(x) dbcmdrow((x))
646 DBINT
dbconvert(
DBPROCESS * dbproc,
int srctype,
const BYTE * src, DBINT srclen,
int desttype, BYTE * dest, DBINT destlen);
647 DBINT
dbconvert_ps(
DBPROCESS * dbprocess,
int srctype, BYTE * src, DBINT srclen,
int desttype, BYTE * dest, DBINT destlen,
652 #define DBCOUNT(x) dbcount((x))
655 #define DBCURCMD(x) dbcurcmd((x))
658 #define DBCURROW(x) dbcurrow((x))
665 #define DBDEAD(x) dbdead((x))
671 #define DBFIRSTROW(x) dbfirstrow((x))
674 char *dbgetcharset(
DBPROCESS * dbprocess);
675 int dbgetlusername(
LOGINREC * login, BYTE * name_buffer,
int buffer_len);
677 char *dbgetnatlanf(
DBPROCESS * dbprocess);
681 #define DBGETTIME dbgettime
687 #define DBIORDESC(x) dbiordesc((x))
690 #define DBIOWDESC(x) dbiowdesc((x))
693 #define DBISAVAIL(x) dbisavail((x))
697 #define DBLASTROW(x) dblastrow((x))
723 #define DBMORECMDS(x) dbmorecmds((x))
737 #define dbopen(x,y) tdsdbopen((x),(y), 1)
739 #define dbopen(x,y) tdsdbopen((x),(y), 0)
743 #ifdef PHP_SYBASE_DBOPEN
744 #undef PHP_SYBASE_DBOPEN
745 #define PHP_SYBASE_DBOPEN dbopen
755 RETCODE dbresults_r(
DBPROCESS * dbproc,
int recursive);
763 #define DBROWS(x) dbrows((x))
766 #define DBROWTYPE(x) dbrowtype((x))
768 RETCODE
dbrpcparam(
DBPROCESS * dbproc,
const char paramname[], BYTE status,
int type, DBINT maxlen, DBINT datalen, BYTE * value);
770 RETCODE
dbsafestr(
DBPROCESS * dbproc,
const char *src, DBINT srclen,
char *dest, DBINT destlen,
int quotetype);
771 RETCODE *dbsechandle(DBINT type, INTFUNCPTR handler);
774 void dbsetbusy(
DBPROCESS * dbprocess, DB_DBBUSY_FUNC busyfunc);
775 RETCODE dbsetdefcharset(
char *charset);
776 void dbsetidle(
DBPROCESS * dbprocess, DB_DBIDLE_FUNC idlefunc);
782 RETCODE
dbsetopt(
DBPROCESS * dbproc,
int option,
const char *char_param,
int int_param);
796 int dbstrbuild(
DBPROCESS * dbproc,
char *charbuf,
int bufsize,
char *text,
char *formats, ...);
801 #define SYBEVERDOWN 100
802 #define SYBEICONVIU 2400
803 #define SYBEICONVAVAIL 2401
804 #define SYBEICONVO 2402
805 #define SYBEICONVI 2403
806 #define SYBEICONV2BIG 2404
809 #define SYBETDSVER 2410
810 #define SYBEPORT 2500
811 #define SYBESYNC 20001
812 #define SYBEFCON 20002
813 #define SYBETIME 20003
814 #define SYBEREAD 20004
815 #define SYBEBUFL 20005
816 #define SYBEWRIT 20006
817 #define SYBEVMS 20007
818 #define SYBESOCK 20008
819 #define SYBECONN 20009
820 #define SYBEMEM 20010
821 #define SYBEDBPS 20011
822 #define SYBEINTF 20012
823 #define SYBEUHST 20013
824 #define SYBEPWD 20014
825 #define SYBEOPIN 20015
826 #define SYBEINLN 20016
827 #define SYBESEOF 20017
828 #define SYBESMSG 20018
829 #define SYBERPND 20019
830 #define SYBEBTOK 20020
831 #define SYBEITIM 20021
832 #define SYBEOOB 20022
833 #define SYBEBTYP 20023
834 #define SYBEBNCR 20024
835 #define SYBEIICL 20025
836 #define SYBECNOR 20026
837 #define SYBENPRM 20027
838 #define SYBEUVDT 20028
839 #define SYBEUFDT 20029
840 #define SYBEWAID 20030
841 #define SYBECDNS 20031
842 #define SYBEABNC 20032
843 #define SYBEABMT 20033
844 #define SYBEABNP 20034
845 #define SYBEAAMT 20035
846 #define SYBENXID 20036
847 #define SYBERXID 20037
848 #define SYBEICN 20038
849 #define SYBENMOB 20039
850 #define SYBEAPUT 20040
851 #define SYBEASNL 20041
852 #define SYBENTLL 20042
853 #define SYBEASUL 20043
854 #define SYBERDNR 20044
855 #define SYBENSIP 20045
856 #define SYBEABNV 20046
857 #define SYBEDDNE 20047
858 #define SYBECUFL 20048
859 #define SYBECOFL 20049
860 #define SYBECSYN 20050
861 #define SYBECLPR 20051
862 #define SYBECNOV 20052
863 #define SYBERDCN 20053
864 #define SYBESFOV 20054
865 #define SYBEUNT 20055
866 #define SYBECLOS 20056
867 #define SYBEUAVE 20057
868 #define SYBEUSCT 20058
869 #define SYBEEQVA 20059
870 #define SYBEUDTY 20060
871 #define SYBETSIT 20061
872 #define SYBEAUTN 20062
873 #define SYBEBDIO 20063
874 #define SYBEBCNT 20064
875 #define SYBEIFNB 20065
876 #define SYBETTS 20066
877 #define SYBEKBCO 20067
878 #define SYBEBBCI 20068
879 #define SYBEKBCI 20069
880 #define SYBEBCRE 20070
881 #define SYBETPTN 20071
882 #define SYBEBCWE 20072
883 #define SYBEBCNN 20073
884 #define SYBEBCOR 20074
885 #define SYBEBCIS 20075
886 #define SYBEBCPI 20076
887 #define SYBEBCPN 20077
888 #define SYBEBCPB 20078
889 #define SYBEVDPT 20079
890 #define SYBEBIVI 20080
891 #define SYBEBCBC 20081
892 #define SYBEBCFO 20082
893 #define SYBEBCVH 20083
894 #define SYBEBCUO 20084
895 #define SYBEBCUC 20085
896 #define SYBEBUOE 20086
897 #define SYBEBUCE 20087
898 #define SYBEBWEF 20088
899 #define SYBEASTF 20089
900 #define SYBEUACS 20090
901 #define SYBEASEC 20091
902 #define SYBETMTD 20092
903 #define SYBENTTN 20093
904 #define SYBEDNTI 20094
905 #define SYBEBTMT 20095
906 #define SYBEORPF 20096
907 #define SYBEUVBF 20097
908 #define SYBEBUOF 20098
909 #define SYBEBUCF 20099
910 #define SYBEBRFF 20100
911 #define SYBEBWFF 20101
912 #define SYBEBUDF 20102
913 #define SYBEBIHC 20103
914 #define SYBEBEOF 20104
915 #define SYBEBCNL 20105
916 #define SYBEBCSI 20106
917 #define SYBEBCIT 20107
918 #define SYBEBCSA 20108
919 #define SYBENULL 20109
920 #define SYBEUNAM 20110
921 #define SYBEBCRO 20111
922 #define SYBEMPLL 20112
923 #define SYBERPIL 20113
924 #define SYBERPUL 20114
925 #define SYBEUNOP 20115
926 #define SYBECRNC 20116
927 #define SYBERTCC 20117
928 #define SYBERTSC 20118
929 #define SYBEUCRR 20119
930 #define SYBERPNA 20120
931 #define SYBEOPNA 20121
932 #define SYBEFGTL 20122
933 #define SYBECWLL 20123
934 #define SYBEUFDS 20124
935 #define SYBEUCPT 20125
936 #define SYBETMCF 20126
937 #define SYBEAICF 20127
938 #define SYBEADST 20128
939 #define SYBEALTT 20129
940 #define SYBEAPCT 20130
941 #define SYBEXOCI 20131
942 #define SYBEFSHD 20132
943 #define SYBEAOLF 20133
944 #define SYBEARDI 20134
945 #define SYBEURCI 20135
946 #define SYBEARDL 20136
947 #define SYBEURMI 20137
948 #define SYBEUREM 20138
949 #define SYBEURES 20139
950 #define SYBEUREI 20140
951 #define SYBEOREN 20141
952 #define SYBEISOI 20142
953 #define SYBEIDCL 20143
954 #define SYBEIMCL 20144
955 #define SYBEIFCL 20145
956 #define SYBEUTDS 20146
957 #define SYBEBUFF 20147
958 #define SYBEACNV 20148
959 #define SYBEDPOR 20149
960 #define SYBENDC 20150
961 #define SYBEMVOR 20151
962 #define SYBEDVOR 20152
963 #define SYBENBVP 20153
964 #define SYBESPID 20154
965 #define SYBENDTP 20155
966 #define SYBEXTN 20156
967 #define SYBEXTDN 20157
968 #define SYBEXTSN 20158
969 #define SYBENUM 20159
970 #define SYBETYPE 20160
971 #define SYBEGENOS 20161
972 #define SYBEPAGE 20162
973 #define SYBEOPTNO 20163
974 #define SYBEETD 20164
975 #define SYBERTYPE 20165
976 #define SYBERFILE 20166
977 #define SYBEFMODE 20167
978 #define SYBESLCT 20168
979 #define SYBEZTXT 20169
980 #define SYBENTST 20170
981 #define SYBEOSSL 20171
982 #define SYBEESSL 20172
983 #define SYBENLNL 20173
984 #define SYBENHAN 20174
985 #define SYBENBUF 20175
986 #define SYBENULP 20176
987 #define SYBENOTI 20177
988 #define SYBEEVOP 20178
989 #define SYBENEHA 20179
990 #define SYBETRAN 20180
991 #define SYBEEVST 20181
992 #define SYBEEINI 20182
993 #define SYBEECRT 20183
994 #define SYBEECAN 20184
995 #define SYBEEUNR 20185
996 #define SYBERPCS 20186
997 #define SYBETPAR 20187
998 #define SYBETEXS 20188
999 #define SYBETRAC 20189
1000 #define SYBETRAS 20190
1001 #define SYBEPRTF 20191
1002 #define SYBETRSN 20192
1003 #define SYBEBPKS 20193
1004 #define SYBEIPV 20194
1005 #define SYBEMOV 20195
1006 #define SYBEDIVZ 20196
1007 #define SYBEASTL 20197
1008 #define SYBESEFA 20198
1009 #define SYBEPOLL 20199
1010 #define SYBENOEV 20200
1011 #define SYBEBADPK 20201
1012 #define SYBESECURE 20202
1013 #define SYBECAP 20203
1014 #define SYBEFUNC 20204
1015 #define SYBERESP 20205
1016 #define SYBEIVERS 20206
1017 #define SYBEONCE 20207
1018 #define SYBERPNULL 20208
1019 #define SYBERPTXTIM 20209
1020 #define SYBENEG 20210
1021 #define SYBELBLEN 20211
1022 #define SYBEUMSG 20212
1023 #define SYBECAPTYP 20213
1024 #define SYBEBNUM 20214
1025 #define SYBEBBL 20215
1026 #define SYBEBPREC 20216
1027 #define SYBEBSCALE 20217
1028 #define SYBECDOMAIN 20218
1029 #define SYBECINTERNAL 20219
1030 #define SYBEBTYPSRV 20220
1031 #define SYBEBCSET 20221
1032 #define SYBEFENC 20222
1033 #define SYBEFRES 20223
1034 #define SYBEISRVPREC 20224
1035 #define SYBEISRVSCL 20225
1036 #define SYBEINUMCL 20226
1037 #define SYBEIDECCL 20227
1038 #define SYBEBCMTXT 20228
1039 #define SYBEBCPREC 20229
1040 #define SYBEBCBNPR 20230
1041 #define SYBEBCBNTYP 20231
1042 #define SYBEBCSNTYP 20232
1043 #define SYBEBCPCTYP 20233
1044 #define SYBEBCVLEN 20234
1045 #define SYBEBCHLEN 20235
1046 #define SYBEBCBPREF 20236
1047 #define SYBEBCPREF 20237
1048 #define SYBEBCITBNM 20238
1049 #define SYBEBCITBLEN 20239
1050 #define SYBEBCSNDROW 20240
1051 #define SYBEBPROCOL 20241
1052 #define SYBEBPRODEF 20242
1053 #define SYBEBPRONUMDEF 20243
1054 #define SYBEBPRODEFID 20244
1055 #define SYBEBPRONODEF 20245
1056 #define SYBEBPRODEFTYP 20246
1057 #define SYBEBPROEXTDEF 20247
1058 #define SYBEBPROEXTRES 20248
1059 #define SYBEBPROBADDEF 20249
1060 #define SYBEBPROBADTYP 20250
1061 #define SYBEBPROBADLEN 20251
1062 #define SYBEBPROBADPREC 20252
1063 #define SYBEBPROBADSCL 20253
1064 #define SYBEBADTYPE 20254
1065 #define SYBECRSNORES 20255
1066 #define SYBECRSNOIND 20256
1067 #define SYBECRSVIEW 20257
1068 #define SYBECRSVIIND 20258
1069 #define SYBECRSORD 20259
1070 #define SYBECRSBUFR 20260
1071 #define SYBECRSNOFREE 20261
1072 #define SYBECRSDIS 20262
1073 #define SYBECRSAGR 20263
1074 #define SYBECRSFRAND 20264
1075 #define SYBECRSFLAST 20265
1076 #define SYBECRSBROL 20266
1077 #define SYBECRSFROWN 20267
1078 #define SYBECRSBSKEY 20268
1079 #define SYBECRSRO 20269
1080 #define SYBECRSNOCOUNT 20270
1081 #define SYBECRSTAB 20271
1082 #define SYBECRSUPDNB 20272
1083 #define SYBECRSNOWHERE 20273
1084 #define SYBECRSSET 20274
1085 #define SYBECRSUPDTAB 20275
1086 #define SYBECRSNOUPD 20276
1087 #define SYBECRSINV 20277
1088 #define SYBECRSNOKEYS 20278
1089 #define SYBECRSNOBIND 20279
1090 #define SYBECRSFTYPE 20280
1091 #define SYBECRSINVALID 20281
1092 #define SYBECRSMROWS 20282
1093 #define SYBECRSNROWS 20283
1094 #define SYBECRSNOLEN 20284
1095 #define SYBECRSNOPTCC 20285
1096 #define SYBECRSNORDER 20286
1097 #define SYBECRSNOTABLE 20287
1098 #define SYBECRSNUNIQUE 20288
1099 #define SYBECRSVAR 20289
1100 #define SYBENOVALUE 20290
1101 #define SYBEVOIDRET 20291
1102 #define SYBECLOSEIN 20292
1103 #define SYBEBOOL 20293
1104 #define SYBEBCPOPT 20294
1105 #define SYBEERRLABEL 20295
1106 #define SYBEATTNACK 20296
1107 #define SYBEBBFL 20297
1108 #define SYBEDCL 20298
1109 #define SYBECS 20299
1110 #define SYBEBULKINSERT 20599
1114 #define DBTDS(a) dbtds(a)
1115 DBINT dbtextsize(
DBPROCESS * dbprocess);
1118 DBBINARY *dbtxtsnewval(
DBPROCESS * dbprocess);
1119 RETCODE dbtxtsput(
DBPROCESS * dbprocess, DBBINARY newtxts,
int colnum);
1123 RETCODE
dbwritetext(
DBPROCESS * dbproc,
char *objname, DBBINARY * textptr, DBTINYINT textptrlen, DBBINARY * timestamp,
1124 DBBOOL log, DBINT size, BYTE * text);
1133 #define DBSETLHOST(x,y) dbsetlname((x), (y), DBSETHOST)
1134 #define dbsetlhost(x,y) dbsetlname((x), (y), DBSETHOST)
1136 #define DBSETLUSER(x,y) dbsetlname((x), (y), DBSETUSER)
1137 #define dbsetluser(x,y) dbsetlname((x), (y), DBSETUSER)
1139 #define DBSETLPWD(x,y) dbsetlname((x), (y), DBSETPWD)
1140 #define dbsetlpwd(x,y) dbsetlname((x), (y), DBSETPWD)
1141 #if defined(DBLIB_UNIMPLEMENTED)
1143 # define DBSETLHID(x,y) dbsetlname((x), (y), DBSETHID)
1146 #define DBSETLAPP(x,y) dbsetlname((x), (y), DBSETAPP)
1147 #define dbsetlapp(x,y) dbsetlname((x), (y), DBSETAPP)
1149 #define BCP_SETL(x,y) dbsetlbool((x), (y), DBSETBCP)
1150 #define DBSETLSECURE(x) dbsetlbool((x), (1), DBSETBCP)
1151 #define DBSETNATLANG 7
1152 #define DBSETLNATLANG(x,y) dbsetlname((x), (y), DBSETNATLANG)
1153 #define dbsetlnatlang(x,y) dbsetlname((x), (y), DBSETNATLANG)
1154 #if defined(DBLIB_UNIMPLEMENTED)
1155 # define DBSETNOSHORT 8
1156 # define DBSETLNOSHORT(x,y) dbsetlbool((x), (y), DBSETNOSHORT)
1157 # define DBSETHIER 9
1158 # define DBSETLHIER(x,y) dbsetlshort((x), (y), DBSETHIER)
1160 #define DBSETCHARSET 10
1161 #define DBSETLCHARSET(x,y) dbsetlname((x), (y), DBSETCHARSET)
1162 #define DBSETPACKET 11
1163 #define DBSETLPACKET(x,y) dbsetllong((x), (y), DBSETPACKET)
1164 #define dbsetlpacket(x,y) dbsetllong((x), (y), DBSETPACKET)
1165 #define DBSETENCRYPT 12
1166 #define DBSETLENCRYPT(x,y) dbsetlbool((x), (y), DBSETENCRYPT)
1167 #define DBSETLABELED 13
1168 #define DBSETLLABELED(x,y) dbsetlbool((x), (y), DBSETLABELED)
1169 #define BCP_SETLABELED(x,y) dbsetlbool((x), (y), DBSETLABELED)
1170 #define DBSETDBNAME 14
1171 #define DBSETLDBNAME(x,y) dbsetlname((x), (y), DBSETDBNAME)
1172 #define DBSETLVERSION(login, version) dbsetlversion((login), (version))
1174 RETCODE
bcp_init(
DBPROCESS * dbproc,
const char *tblname,
const char *hfile,
const char *errfile,
int direction);
1178 RETCODE
bcp_bind(
DBPROCESS * dbproc, BYTE * varaddr,
int prefixlen, DBINT varlen, BYTE * terminator,
int termlen,
int type,
1182 RETCODE
bcp_colfmt(
DBPROCESS * dbproc,
int host_column,
int host_type,
int host_prefixlen, DBINT host_collen,
1183 const BYTE * host_term,
int host_termlen,
int colnum);
1184 RETCODE
bcp_colfmt_ps(
DBPROCESS * dbproc,
int host_column,
int host_type,
int host_prefixlen, DBINT host_collen,
1185 BYTE * host_term,
int host_termlen,
int colnum,
DBTYPEINFO * typeinfo);
1188 int bcp_getbatchsize(
DBPROCESS * dbproc);