1 {*********************************************************}
3 { Zeos Database Objects }
4 { Delphi plain driver interface to DBLibrary }
6 { Originally written by Janos Fegyverneki }
7 { FreeTDS supportd by Bogdan Dragulin }
9 {*********************************************************}
11 {@********************************************************}
12 { Copyright (c) 1999-2012 Zeos Development Group }
14 { License Agreement: }
16 { This library is distributed in the hope that it will be }
17 { useful, but WITHOUT ANY WARRANTY; without even the }
18 { implied warranty of MERCHANTABILITY or FITNESS FOR }
19 { A PARTICULAR PURPOSE. See the GNU Lesser General }
20 { Public License for more details. }
22 { The source code of the ZEOS Libraries and packages are }
23 { distributed under the Library GNU General Public }
24 { License (see the file COPYING / COPYING.ZEOS) }
25 { with the following modification: }
26 { As a special exception, the copyright holders of this }
27 { library give you permission to link this library with }
28 { independent modules to produce an executable, }
29 { regardless of the license terms of these independent }
30 { modules, and to copy and distribute the resulting }
31 { executable under terms of your choice, provided that }
32 { you also meet, for each linked independent module, }
33 { the terms and conditions of the license of that module. }
34 { An independent module is a module which is not derived }
35 { from or based on this library. If you modify this }
36 { library, you may extend this exception to your version }
37 { of the library, but you are not obligated to do so. }
38 { If you do not wish to do so, delete this exception }
39 { statement from your version. }
42 { The project web site is located on: }
43 { http://zeos.firmos.at (FORUM) }
44 { http://sourceforge.net/p/zeoslib/tickets/ (BUGTRACKER)}
45 { svn://svn.code.sf.net/p/zeoslib/code-0/trunk (SVN) }
47 { http://www.sourceforge.net/projects/zeoslib. }
50 { Zeos Development Group. }
51 {********************************************************@}
53 unit ZPlainDbLibConstants;
60 ZCompatibility; // M.A.
62 {***************** Plain API Constants definition ****************}
65 TIMEOUT_IGNORE = Cardinal(-1);
67 TIMEOUT_MAXIMUM = 1200; { 20 minutes maximum timeout value }
69 { Used for ServerType in dbgetprocinfo }
71 SERVTYPE_MICROSOFT = 1;
79 { Bulk Copy Definitions (bcp) }
80 DB_IN = 1; { Transfer from client to server }
81 DB_OUT = 2; { Transfer from server to client }
83 BCPMAXERRS = 1; { bcp_control parameter }
84 BCPFIRST = 2; { bcp_control parameter }
85 BCPLAST = 3; { bcp_control parameter }
86 BCPBATCH = 4; { bcp_control parameter }
87 BCPKEEPNULLS = 5; { bcp_control parameter }
88 BCPABORT = 6; { bcp_control parameter }
89 BCPKEEPIDENTITY = 8; { bcp_control parameter }
91 BCPLABELED = 5; { bcp_control parameter }
92 BCPHINTS = 6; { bcp_control parameter }
94 DBCMDNONE = 0; { bcp_control parameter }
95 DBCMDPEND = 1; { bcp_control parameter }
96 DBCMDSENT = 2; { bcp_control parameter }
113 SMALLDATETIBIND = 16;
118 MAXBIND = SRCNUMERICBIND;
127 DBFINDONE = $04; { Definately done }
128 DBMORE = $10; { Maybe more commands waiting }
129 DBMORE_ROWS = $20; { This command returned rows }
132 DBTXTSLEN = 8; { Timestamp length }
133 DBTXPLEN = 16; { Text pointer length }
135 { Error code returns }
140 //from FreeTDS sybdb.h:
141 { DBVERSION_xxx are used with dbsetlversion() }
142 DBVERSION_100= 2; // Sybase TDS 5.0
143 DBVERSION_42 = 3; // This can be used for old Microsoft and Sybase servers
149 {Zeos dbsetversion placeholders}
150 ZVersion_UNKNOWN = 0;
151 ZVersion_2_0 = 1; { pre 4.0 SQL Server }
152 ZVersion_3_4 = 2; { Microsoft SQL Server (3.0) }
153 ZVersion_4_0 = 3; { 4.0 SQL Server }
154 ZVersion_4_2 = 4; { 4.2 SQL Server }
155 ZVersion_4_6 = 5; { 2.0 OpenServer and 4.6 SQL Server. }
156 ZVersion_4_9_5 = 6; { 4.9.5 (NCR) SQL Server }
157 ZVersion_5_0 = 7; { 5.0 SQL Server }
158 ZVersion_7_0 = 8; { Microsoft SQL Server 7.0 }
159 ZVersion_8_0 = 9; { Microsoft SQL Server 2000 }
160 ZVersion_9_0 = 10; { Microsoft SQL Server 2005 }
161 ZVersion_7_1 = 9; { Microsoft SQL Server 2000 }
162 ZVersion_7_2 = 10; { Microsoft SQL Server 2005 }
163 ZVersion_7_3 = 11; { Microsoft SQL Server 2008 }
165 ZVersionMax = 13; { known count of available versions }
166 ZVersionEmpty = -1; { placeholder for unsuported version }
168 { DB-Library datatypes }
170 {Zeos DBOption placeholders}
171 { a large list of options, DBTEXTSIZE is needed by sybtcl }
205 Z_CLIENTCURSORS = 33;
218 { loginrec manipulation Placeholders}
237 { datatype plazeholders }
268 DBLIBDBTEXTLIMIT = 4;
270 DBLIBDBARITHABORT = 6;
271 DBLIBDBARITHIGNORE = 7;
272 DBLIBDBNOAUTOFREE = 8;
275 DBLIBDBPARSEONLY = 11;
276 DBLIBDBSHOWPLAN = 12;
277 DBLIBDBSTORPROCID = 13;
278 DBLIBDBANSITOOEM = 14;
279 DBLIBDBOEMTOANSI = 15;
280 DBLIBDBCLIENTCURSORS = 16;
281 DBLIBDBSET_TIME = 17;
282 DBLIBDBQUOTEDIDENT = 18;
284 { FreeTDS options, a large list of options, DBTEXTSIZE is needed by sybtcl }
318 TDSCLIENTCURSORS = 33;
331 { common Login manipulations }
335 { Sybase Login manipulations }
337 SYBDBSETHOST = DBSETHOST;
338 SYBDBSETUSER = DBSETUSER;
339 SYBDBSETPWD = DBSETPWD;
346 SYBDBSETCHARSET = 10;
348 SYBDBSETENCRYPT = 12;
349 SYBDBSETLABELED = 13;
351 { MsSQL Login manipulations }
353 MSDBSETHOST = DBSETHOST;
354 MSDBSETUSER = DBSETUSER;
355 MSDBSETPWD = DBSETPWD;
361 MSDBSET_LOGIN_TIME = 10;
362 MSDBSETFALLBACK = 12;
364 {TDS Loginrec manipulations}
365 TDSDBSETHOST = DBSETHOST;
366 TDSDBSETUSER = DBSETUSER;
367 TDSDBSETPWD = DBSETPWD;
375 TDSDBSETCHARSET = 10;
377 TDSDBSETENCRYPT = 12;
378 TDSDBSETLABELED = 13;
381 { TDS_DBVERSION_xxx are used with dbsetversion() }
382 TDSDBVERSION_UNKNOWN = 0;
384 TDSDBVERSION_100 = 2; // Sybase TDS 5.0
385 TDSDBVERSION_42 = 3; // This can be used for old Microsoft and Sybase servers
388 TDSDBVERSION_80 = TDSDBVERSION_71;
392 { these two are defined by Microsoft for dbsetlversion() }
397 * DBTDS_xxx are returned by DBTDS()
398 * The integer values of the constants are poorly chosen.
401 DBTDS_2_0 = 1; { pre 4.0 SQL Server }
402 DBTDS_3_4 = 2; { Microsoft SQL Server (3.0) }
403 DBTDS_4_0 = 3; { 4.0 SQL Server }
404 DBTDS_4_2 = 4; { 4.2 SQL Server }
405 DBTDS_4_6 = 5; { 2.0 OpenServer and 4.6 SQL Server. }
406 DBTDS_4_9_5 = 6; { 4.9.5 (NCR) SQL Server }
407 DBTDS_5_0 = 7; { 5.0 SQL Server }
408 DBTDS_7_0 = 8; { Microsoft SQL Server 7.0 }
409 DBTDS_8_0 = 9; { Microsoft SQL Server 2000 }
410 DBTDS_9_0 = 10; { Microsoft SQL Server 2005 }
411 DBTDS_7_1 = 9; { Microsoft SQL Server 2000 }
412 DBTDS_7_2 = 10; { Microsoft SQL Server 2005 }
413 DBTDS_7_3 = 11; { Microsoft SQL Server 2008 }
419 DBLIBSQLVARBINARY = $25;
420 DBLIBSQLINTN = $26; { all nullable integers }
421 DBLIBSQLVARCHAR = $27;
422 DBLIBSQLBINARY = $2d;
430 DBLIBSQLDATETIME = $3d;
433 DBLIBSQLMONEYN = $6e;
434 DBLIBSQLDATETIMN = $6f;
436 DBLIBSQLMONEY4 = $7a;
437 DBLIBSQLDATETIM4 = $3a;
438 DBLIBSQLDECIMAL = $6a;
439 DBLIBSQLNUMERIC = $6c;
441 { Data stream tokens }
452 SQLRETURNVALUE = $ac;
453 SQLRETURNSTATUS = $79;
464 SQLLOGINACK = $ad; { NOTICE: change to real value }
475 { Error numbers (dberrs) DB-Library error codes }
568 SQLCRSUPDTAB = 10092;
585 SQLENONFLOAT = 10109;
588 { The severity levels are defined here }
589 EXINFO = 1; { Informational, non-error }
590 EXUSER = 2; { User error }
591 EXNONFATAL = 3; { Non-fatal error }
592 EXCONVERSION = 4; { Error in DB-LIBRARY data conversion }
593 EXSERVER = 5; { The Server has returned an error flag }
594 EXTIME = 6; { We have exceeded our timeout period while }
595 { waiting for a response from the Server - the }
596 { DBPROCESS is still alive }
597 EXPROGRAM = 7; { Coding error in user program }
598 EXRESOURCE = 8; { Running out of resources - the DBPROCESS may be dead }
599 EXCOMM = 9; { Failure in communication with Server - the DBPROCESS is dead }
600 EXFATAL = 10; { Fatal error - the DBPROCESS is dead }
601 EXCONSISTENCY = 11; { Internal software error - notify MS Technical Supprt }
603 { Offset identifiers }
609 OFF_PROCEDURE = $16a;
610 OFF_STATEMENT = $1cb;
614 { Decimal constants }
618 DEFAULTPRECISION = 18;
621 { DB-Table constants}
622 { Pack the following structures on a word boundary }
623 TDSMAXTABLENAME = 512;
624 TDSMAXCOLNAMELEN = 512;
626 { DB-Table constants}
627 { Pack the following structures on a word boundary }
631 { DB-Library datatype definitions }
632 DBMAXCHAR=256; // Max length of DBVARBINARY and DBVARCHAR, etc.
634 { Print lengths for certain fixed length data types }
642 PRDECIMAL = (MAXNUMERICDIG + 2);
643 PRNUMERIC = (MAXNUMERICDIG + 2);
649 DBUNKNOWN = 2; { FALSE = 0, TRUE = 1 }
654 BUF_FULL = -3; { only if buffering is turned on }
656 { Status code for dbresults(). Possible return values are }
657 { SUCCEED, FAIL, and NO_MORE_RESULTS. }
659 NO_MORE_RPC_RESULTS = 3;
661 { Standard exit and error values }
666 DBRPCRECOMPILE = $0001;
674 { Cursor related constants }
676 { Following flags are used in the concuropt parameter in the dbcursoropen function }
677 CUR_READONLY = 1; { Read only cursor, no data modifications }
678 CUR_LOCKCC = 2; { Intent to update, all fetched data locked when }
679 { dbcursorfetch is called inside a transaction block }
680 CUR_OPTCC = 3; { Optimistic concurrency control, data modifications }
681 { succeed only if the row hasn't been updated since }
683 CUR_OPTCCVAL = 4; { Optimistic concurrency control based on selected column values }
685 { Following flags are used in the scrollopt parameter in dbcursoropen }
686 CUR_FORWARD = 0; { Forward only scrolling }
687 CUR_KEYSET = -1; { Keyset driven scrolling }
688 CUR_DYNAMIC = 1; { Fully dynamic }
689 CUR_INSENSITIVE = -2; { Server-side cursors only }
691 { Following flags define the fetchtype in the dbcursorfetch function }
692 FETCH_FIRST = 1; { Fetch first n rows }
693 FETCH_NEXT = 2; { Fetch next n rows }
694 FETCH_PREV = 3; { Fetch previous n rows }
695 FETCH_RANDOM = 4; { Fetch n rows beginning with given row # }
696 FETCH_RELATIVE = 5; { Fetch relative to previous fetch row # }
697 FETCH_LAST = 6; { Fetch the last n rows }
699 { Following flags define the per row status as filled by dbcursorfetch and/or dbcursorfetchex }
700 FTC_EMPTY = $00; { No row available }
701 FTC_SUCCEED = $01; { Fetch succeeded, (failed if not set) }
702 FTC_MISSING = $02; { The row is missing }
703 FTC_ENDOFKEYSET = $04; { End of the keyset reached }
704 FTC_ENDOFRESULTS = $08; { End of results set reached }
706 { Following flags define the operator types for the dbcursor function }
707 CRS_UPDATE = 1; { Update operation }
708 CRS_DELETE = 2; { Delete operation }
709 CRS_INSERT = 3; { Insert operation }
710 CRS_REFRESH = 4; { Refetch given row }
711 CRS_LOCKCC = 5; { Lock given row }
713 { Following value can be passed to the dbcursorbind function for NOBIND type }
714 NOBIND = -2; { Return length and pointer to data }
716 { Following are values used by DBCURSORINFO's Type parameter }
717 CU_CLIENT = $00000001;
718 CU_SERVER = $00000002;
719 CU_KEYSET = $00000004;
720 CU_MIXED = $00000008;
721 CU_DYNAMIC = $00000010;
722 CU_FORWARD = $00000020;
723 CU_INSENSITIVE = $00000040;
724 CU_READONLY = $00000080;
725 CU_LOCKCC = $00000100;
726 CU_OPTCC = $00000200;
727 CU_OPTCCVAL = $00000400;
729 { Following are values used by DBCURSORINFO's Status parameter }
730 CU_FILLING = $00000001;
731 CU_FILLED = $00000002;
733 { Following are values used by dbupdatetext's type parameter }
737 UT_DELETEONLY = $0008;
740 { The following values are passed to dbserverenum for searching criteria. }
744 { These constants are the possible return values from dbserverenum. }
745 ENUM_SUCCESS = $0000;
747 NET_NOT_AVAIL = $0002;
748 OUT_OF_MEMORY = $0004;
749 NOT_SUPPORTED = $0008;
750 ENUM_INVALID_PARAM = $0010;
752 { Netlib Error problem codes. ConnectionError() should return one of }
753 { these as the dblib-mapped problem code, so the corresponding string }
754 { is sent to the dblib app's error handler as dberrstr. Return NE_E_NOMAP }
755 { for a generic DB-Library error string (as in prior versions of dblib). }
757 NE_E_NOMAP = 0; { No string; uses dblib default. }
758 NE_E_NOMEMORY = 1; { Insufficient memory. }
759 NE_E_NOACCESS = 2; { Access denied. }
760 NE_E_CONNBUSY = 3; { Connection is busy. }
761 NE_E_CONNBROKEN = 4; { Connection broken. }
762 NE_E_TOOMANYCONN = 5; { Connection limit exceeded. }
763 NE_E_SERVERNOTFOUND = 6; { Specified SQL server not found. }
764 NE_E_NETNOTSTARTED = 7; { The network has not been started. }
765 NE_E_NORESOURCE = 8; { Insufficient network resources. }
766 NE_E_NETBUSY = 9; { Network is busy. }
767 NE_E_NONETACCESS = 10; { Network access denied. }
768 NE_E_GENERAL = 11; { General network error. Check your documentation. }
769 NE_E_CONNMODE = 12; { Incorrect connection mode. }
770 NE_E_NAMENOTFOUND = 13; { Name not found in directory service. }
771 NE_E_INVALIDCONN = 14; { Invalid connection. }
772 NE_E_NETDATAERR = 15; { Error reading or writing network data. }
773 NE_E_TOOMANYFILES = 16; { Too many open file handles. }
774 NE_E_CANTCONNECT = 17; { SQL Server does not exist or access denied. }
776 NE_MAX_NETERROR = 17;
782 MAXNETLIBCONNSTR = 255;
785 INVALID_UROWNUM = Cardinal(-1);
788 { copied from tds.h }
790 SYBCHAR = 47; (* 0x2F *)
791 SYBVARCHAR = 39; (* 0x27 *)
792 SYBINTN = 38; (* 0x26 *)
793 SYBINT1 = 48; (* 0x30 *)
794 SYBINT2 = 52; (* 0x34 *)
795 SYBINT4 = 56; (* 0x38 *)
796 SYBINT8 = 127; (* 0x7F *)
797 SYBFLT8 = 62; (* 0x3E *)
798 SYBDATETIME = 61; (* 0x3D *)
799 SYBBIT = 50; (* 0x32 *)
800 SYBBITN = 104; (* 0x68 *)
801 SYBTEXT = 35; (* 0x23 *)
802 SYBNTEXT = 99; (* 0x63 *)
803 SYBIMAGE = 34; (* 0x22 *)
804 SYBMONEY4 = 122; (* 0x7A *)
805 SYBMONEY = 60; (* 0x3C *)
806 SYBDATETIME4 = 58; (* 0x3A *)
807 SYBREAL = 59; (* 0x3B *)
808 SYBBINARY = 45; (* 0x2D *)
809 SYBVOID = 31; (* 0x1F *)
810 SYBVARBINARY = 37; (* 0x25 *)
811 SYBNUMERIC = 108; (* 0x6C *)
812 SYBDECIMAL = 106; (* 0x6A *)
813 SYBFLTN = 109; (* 0x6D *)
814 SYBMONEYN = 110; (* 0x6E *)
815 SYBDATETIMN = 111; (* 0x6F *)
816 SYBNVARCHAR = 103; (* 0x67 *)
817 XSYBCHAR = 175; (* 0xAF *)
818 XSYBVARCHAR = 167; (* 0xA7 *)
819 XSYBNVARCHAR = 231; (* 0xE7 *)
820 XSYBNCHAR = 239; (* 0xEF *)
821 XSYBVARBINARY = 165; (* 0xA5 *)
822 XSYBBINARY = 173; (* 0xAD *)
823 SYBUNIQUE = 36; (* 0x24 *)
824 SYBVARIANT = 98; (* 0x62 *)
825 SYBMSUDT = 240; (* 0xF0 *)
826 SYBMSXML = 241; (* 0xF1 *)
828 { FreeTDS Data Type Tokens }
829 TDSSQLVOID = SYBVOID;
830 TDSSQLTEXT = SYBTEXT;
831 TDSSQLVARBINARY = SYBVARBINARY;
832 TDSSQLINTN = SYBINTN;
833 TDSSQLVARCHAR = SYBVARCHAR;
834 TDSSQLBINARY = SYBBINARY;
835 TDSSQLIMAGE = SYBIMAGE;
836 TDSSQLCHAR = SYBCHAR;
837 TDSSQLINT1 = SYBINT1;
839 TDSSQLINT2 = SYBINT2;
840 TDSSQLINT4 = SYBINT4;
841 TDSSQLMONEY = SYBMONEY;
842 TDSSQLDATETIME = SYBDATETIME;
843 TDSSQLFLT8 = SYBFLT8;
844 TDSSQLFLTN = SYBFLTN;
845 TDSSQLMONEYN = SYBMONEYN;
846 TDSSQLDATETIMN = SYBDATETIMN;
847 TDSSQLFLT4 = SYBREAL;
848 TDSSQLMONEY4 = SYBMONEY4;
849 TDSSQLDATETIM4 = SYBDATETIME4;
850 TDSSQLDECIMAL = SYBDECIMAL;
851 TDSSQLNUMERIC = SYBNUMERIC;
862 { mssql2k compute operator }
868 SYBAOPCHECKSUM_AGG = $72;
869 {****************** Plain API Types definition *****************}
871 { DBPROCESS, LOGINREC and DBCURSOR }
872 PDBPROCESS = Pointer;
877 DBSORTORDER = Pointer;
879 DBVOIDPTR = PPointer;
881 { DB-Library datatypes }
886 DBSMALLINT = SmallInt; { int16_type }
887 DBINT = LongInt; { int32_type }
888 DBBIGINT = Int64; { int64_type }
890 DBFLT4 = Single; { real32_type }
891 DBFLT8 = Double; { real64_type }
896 PDBMONEY4 = ^DBMONEY4;
902 //typedef int (*INTFUNCPTR) (void *, ...);
903 //typedef int (*DBWAITFUNC) (void);
904 //typedef DBWAITFUNC(*DB_DBBUSY_FUNC) (void *dbproc);
905 //typedef void (*DB_DBIDLE_FUNC) (DBWAITFUNC dfunc, void *dbproc);
906 //typedef int (*DB_DBCHKINTR_FUNC) (void *dbproc);
907 //typedef int (*DB_DBHNDLINTR_FUNC) (void *dbproc); *)
912 DBDATETIM4 = packed record
913 numdays: Word; { No of days since Jan-1-1900 }
914 nummins: Word; { No. of minutes since midnight }
916 PDBDATETIM4 = ^DBDATETIM4;
922 DBNUMERIC = packed record
925 Sign: Byte; { 1 = Positive, 0 = Negative }
926 Val: array[0..MAXNUMERICLEN-1] of Byte;
928 DBDECIMAL = DBNUMERIC;
930 TDSDBNUMERIC = packed record
933 Sign: Byte; { 1 = Positive, 0 = Negative }
934 Val: array[0..MAXNUMERICLEN] of Byte;
936 TDSDBDECIMAL = TDSDBNUMERIC;
938 DBVARYCHAR = packed record
940 Str: array[0..DBMAXCHAR-1] of DBCHAR;
943 DBVARYBIN = packed record
945 Bytes: array[0..DBMAXCHAR-1] of Byte;
948 DBMONEY = packed record
954 PDBDATETIME = ^DBDATETIME;
955 DBDATETIME = packed record
956 dtdays: DBINT; // Days since Jan 1, 1900
957 dttime: LongWord; // 300ths of a second since midnight, 25920000 unit is 1 day
960 PTDSDBDATETIME = ^TTDSDBDATETIME;
961 TTDSDBDATETIME = packed record
962 dtdays: DBINT; // Days since Jan 1, 1900
963 dttime: DBINT; // 300ths of a second since midnight, 25920000 unit is 1 day
967 * Sybase & Microsoft use different names for the dbdaterec members.
968 * Keep these two structures physically identical in memory.
969 * dbdatecrack() casts one to the other for ease of implementation.
971 * Giving credit where credit is due, we can acknowledge that
972 * Microsoft chose the better names here, hands down. ("datedmonth"?!)
975 PTDS_DBDATEREC = ^Ttds_dbdaterec;
976 Ttds_dbdaterec = packed record
977 { fields } {microsoft} {sybase}
978 year: DBINT; { 1753 - 9999 } { 1900 and counting }
979 quarter: DBINT; { 1 - 4 } { 0 - 3 (Microsoft only) }
980 month: DBINT; { 1 - 12 } { 0 - 11 }
981 dayofmonth: DBINT; { 1 - 31 } { 1 - 31 }
982 dayofyear: DBINT; { 1 - 366 } { 1 - 366 (in Sybase.sybdb.h dayofyear and day are changed around!) }
983 week: DBINT; { 1 - 54 (for leap years) } { 1 - 54 (Microsoft only) }
984 weekday: DBINT; { 1 - 7 (Mon - Sun) } { 0 - 6 (Mon - Sun) }
985 hour: DBINT; { 0 - 23 } { 0 - 23 }
986 minute: DBINT; { 0 - 59 } { 0 - 59 }
987 second: DBINT; { 0 - 59 } { 0 - 59 }
988 millisecond: DBINT; { 0 - 999 } { 0 - 997 }
989 tzone: DBINT; { 0 - 127 (Sybase only!) } { 0 - 127 }
992 { DBDATEREC structure used by dbdatecrack }
993 DBDATEREC = packed record
994 year: DBINT; { 1753 - 9999 }
995 quarter: DBINT; { 1 - 4 }
996 month: DBINT; { 1 - 12 }
997 dayofyear: DBINT; { 1 - 366 }
998 day: DBINT; { 1 - 31 }
999 week: DBINT; { 1 - 54 (for leap years) }
1000 weekday: DBINT; { 1 - 7 (Mon - Sun) }
1001 hour: DBINT; { 0 - 23 }
1002 minute: DBINT; { 0 - 59 }
1003 second: DBINT; { 0 - 59 }
1004 millisecond: DBINT; { 0 - 999 }
1006 PDBDATEREC = ^DBDATEREC;
1009 { TODO -ofjanos -cAPI :
1010 Strange but I had to insert X1 and X2 into the structure to make it work.
1011 I have not find any reason for this yet. }
1016 SizeOfStruct: DBINT;
1017 Name: array[0..MAXCOLNAMELEN] of char;
1018 ActualName: array[0..MAXCOLNAMELEN] of char;
1019 TableName: array[0..MAXTABLENAME] of char;
1021 X1: Byte; //Record-Size diffs with C-Records
1028 VarLength: LongBool; { TRUE, FALSE }
1029 Null: BYTE; { TRUE, FALSE or DBUNKNOWN }
1030 CaseSensitive: BYTE; { TRUE, FALSE or DBUNKNOWN }
1031 Updatable: BYTE; { TRUE, FALSE or DBUNKNOWN }
1032 Identity: LongBool; { TRUE, FALSE or DBUNKNOWN }
1034 X2: Byte; //Record-Size diffs with C-Records
1038 {$PACKRECORDS DEFAULT}
1042 PTDSDBCOL = ^TTDSDBCOL;
1043 TTDSDBCOL = packed record
1044 SizeOfStruct: DBINT;
1045 Name: array[0..TDSMAXCOLNAMELEN+2] of AnsiChar;
1046 ActualName: array[0..TDSMAXCOLNAMELEN+2] of AnsiChar;
1047 TableName: array[0..TDSMAXTABLENAME+2] of AnsiChar;
1053 VarLength: LongBool;{ TRUE, FALSE }
1054 Null: Byte; { TRUE, FALSE or DBUNKNOWN }
1055 CaseSensitive: Byte; { TRUE, FALSE or DBUNKNOWN }
1056 Updatable: Byte; { TRUE, FALSE or DBUNKNOWN }
1057 Identity: LongBool;{ TRUE, FALSE }
1061 DBTYPEINFO = packed record
1065 PDBTYPEINFO = ^DBTYPEINFO;
1067 DBPROC_INFO = packed record
1068 SizeOfStruct: DBINT;
1072 ServerRevision: Word;
1073 ServerName: array[0..MAXSERVERNAME] of AnsiChar;
1074 NetLibName: array[0..MAXNETLIBNAME] of AnsiChar;
1075 NetLibConnStr: array[0..MAXNETLIBCONNSTR] of AnsiChar;
1077 PDBPROCINFO = ^DBPROC_INFO;
1079 DBCURSOR_INFO = packed record
1080 SizeOfStruct: DBINT; { Use sizeof(DBCURSORINFO) }
1081 TotCols: Cardinal; { Total Columns in cursor }
1082 TotRows: Cardinal; { Total Rows in cursor }
1083 CurRow: Cardinal; { Current actual row in server }
1084 TotRowsFetched: Cardinal; { Total rows actually fetched }
1085 CurType: Cardinal; { See CU_... }
1086 Status: Cardinal; { See CU_... }
1088 PDBCURSORINFO = ^DBCURSOR_INFO;
1091 { Pointer Datatypes }
1093 PDBBINARY = ^DBBINARY;
1096 PDBLibError = ^TDBLibError;
1097 TDBLibError = record
1102 DbErrStr: AnsiString;
1103 OsErrStr: AnsiString;
1106 PDBLibMessage = ^TDBLibMessage;
1107 TDBLibMessage = record
1112 MsgText: AnsiString;
1113 SrvName: AnsiString;
1114 ProcName: AnsiString;
1119 TDBVariables = record
1120 dboptions: array[0..44] of ShortInt;
1121 dbSetLoginRec: array[0..16] of ShortInt;
1122 datatypes: array[0..22] of Integer;
1125 {common FreeTDS(dblib.dll) and ntwdblib.dll definitions
1126 requirements: the sam call convention }
1127 DBERRHANDLE_PROC = function(Proc: PDBPROCESS; Severity, DbErr, OsErr: Integer;
1128 DbErrStr, OsErrStr: PAnsiChar): Integer; cdecl;
1129 DBMSGHANDLE_PROC = function(Proc: PDBPROCESS; MsgNo: DBINT; MsgState,
1130 Severity: Integer; MsgText, SrvName, ProcName: PAnsiChar; Line: DBUSMALLINT):
1132 Tdberrhandle = function(Handler: DBERRHANDLE_PROC): DBERRHANDLE_PROC; cdecl;
1133 Tdbmsghandle = function(Handler: DBMSGHANDLE_PROC): DBMSGHANDLE_PROC; cdecl;
1135 Tdbprocerrhandle = function(DbHandle: PDBHANDLE; Handler: DBERRHANDLE_PROC):
1136 DBERRHANDLE_PROC; cdecl;
1137 Tdbprocmsghandle = function(DbHandle: PDBHANDLE; Handler: DBMSGHANDLE_PROC):
1138 DBMSGHANDLE_PROC; cdecl;
1140 Tdbadata = function(Proc: PDBPROCESS; ComputeId, Column: Integer): PByte; cdecl;
1141 Tdbadlen = function(Proc: PDBPROCESS; ComputeId, Column: Integer): DBINT; cdecl;
1142 Tdbaltbind = function(Proc: PDBPROCESS; ComputeId, Column, VarType: Integer;
1143 VarLen: DBINT; VarAddr: PByte): RETCODE; cdecl;
1144 Tdbaltcolid = function(Proc: PDBPROCESS; ComputeId, Column: Integer): Integer; cdecl;
1145 Tdbaltlen = function(Proc: PDBPROCESS; ComputeId, Column: Integer): DBINT; cdecl;
1146 Tdbaltop = function(Proc: PDBPROCESS; ComputeId, Column: Integer): Integer; cdecl;
1147 Tdbalttype = function(Proc: PDBPROCESS; ComputeId, Column: Integer): Integer; cdecl;
1148 Tdbaltutype = function(Proc: PDBPROCESS; ComputeId, Column: Integer): DBINT; cdecl;
1149 Tdbanullbind = function(Proc: PDBPROCESS; ComputeId, Column: Integer;
1150 Indicator: PDBINT): RETCODE; cdecl;
1151 Tdbbind = function(Proc: PDBPROCESS; Column, VarType, VarLen: Integer;
1152 VarAddr: PByte): RETCODE; cdecl;
1153 Tdbbylist = function(Proc: PDBPROCESS; ComputeId: Integer; Size: PInteger):
1155 Tdbcancel = function(Proc: PDBPROCESS): RETCODE; cdecl;
1156 Tdbcanquery = function(Proc: PDBPROCESS): RETCODE; cdecl;
1157 Tdbchange = function(Proc: PDBPROCESS): PAnsiChar; cdecl;
1158 Tdbclrbuf = procedure(Proc: PDBPROCESS; N: DBINT); cdecl;
1159 Tdbclropt = function(Proc: PDBPROCESS; Option: Integer; Param: PAnsiChar): RETCODE; cdecl;
1160 Tdbcmd = function(Proc: PDBPROCESS; Cmd: PAnsiChar): RETCODE; cdecl;
1161 Tdbcmdrow = function(Proc: PDBPROCESS): RETCODE; cdecl;
1162 Tdbcollen = function(Proc: PDBPROCESS; Column: Integer): DBINT; cdecl;
1163 Tdbcolname = function(Proc: PDBPROCESS; Column: Integer): PAnsiChar; cdecl;
1164 Tdbcolsource = function(Proc: PDBPROCESS; Column: Integer): PAnsiChar; cdecl;
1165 Tdbcoltype = function(Proc: PDBPROCESS; Column: Integer): Integer; cdecl;
1166 Tdbcolutype = function(Proc: PDBPROCESS; Column: Integer): DBINT; cdecl;
1167 Tdbconvert = function(Proc: PDBPROCESS; SrcType: Integer; Src: PByte;
1168 SrcLen: DBINT; DestType: Integer; Dest: PByte; DestLen: DBINT): Integer; cdecl;
1169 Tdbiscount = function(Proc: PDBPROCESS): LongBool; cdecl;
1170 Tdbcurcmd = function(Proc: PDBPROCESS): Integer; cdecl;
1171 Tdbcurrow = function(Proc: PDBPROCESS): DBINT; cdecl;
1172 Tdbdata = function(Proc: PDBPROCESS; Column: Integer): PByte; cdecl;
1173 Tdbcursor = function(hCursor: PDBCURSOR; OpType, Row: DBINT; Table, Values: PAnsiChar): RETCODE; cdecl;
1174 Tdbexit = procedure; cdecl;
1175 Tdbfcmd = function(Proc: PDBPROCESS; CmdString: PAnsiChar; var Params): RETCODE; cdecl;
1176 Tdbfirstrow = function(Proc: PDBPROCESS): DBINT; cdecl;
1177 Tdbfreebuf = procedure(Proc: PDBPROCESS); cdecl;
1178 Tdbfreequal = procedure(Ptr: PAnsiChar); cdecl;
1179 Tdbgetchar = function(Proc: PDBPROCESS; N: Integer): PAnsiChar; cdecl;
1180 Tdbgetoff = function(Proc: PDBPROCESS; OffType: DBUSMALLINT; StartFrom: Integer): Integer; cdecl;
1181 Tdbgetrow = function(Proc: PDBPROCESS; Row: DBINT): STATUS; cdecl;
1182 Tdbgettime = function: Integer; cdecl;
1183 Tdblastrow = function(Proc: PDBPROCESS): DBINT; cdecl;
1184 Tdblogin = function: PLOGINREC; cdecl;
1185 Tdbmorecmds = function(Proc: PDBPROCESS): RETCODE; cdecl;
1186 Tdbmoretext = function(Proc: PDBPROCESS; Size: DBINT; Text: PByte): RETCODE; cdecl;
1187 Tdbname = function(Proc: PDBPROCESS): PAnsiChar; cdecl;
1188 Tdbnextrow = function(Proc: PDBPROCESS): STATUS; cdecl;
1189 Tdbnullbind = function(Proc: PDBPROCESS; Column: Integer; Indicator: PDBINT):
1191 Tdbnumalts = function(Proc: PDBPROCESS; ComputeId: Integer): Integer; cdecl;
1192 Tdbnumcols = function(Proc: PDBPROCESS): Integer; cdecl;
1193 Tdbnumcompute = function(Proc: PDBPROCESS): Integer; cdecl;
1194 Tdbnumorders = function(Proc: PDBPROCESS): Integer; cdecl;
1195 Tdbnumrets = function(Proc: PDBPROCESS): Integer; cdecl;
1196 Tdbopen = function(Login: PLOGINREC; Host: PAnsiChar): PDBPROCESS; cdecl;
1197 Tdbprhead = procedure(Proc: PDBPROCESS); cdecl;
1198 Tdbprrow = function(Proc: PDBPROCESS): RETCODE; cdecl;
1199 Tdbprtype = function(Token: Integer): PAnsiChar; cdecl;
1200 Tdbqual = function(Proc: PDBPROCESS; TabNum: Integer; TabName: PAnsiChar): PAnsiChar; cdecl;
1201 Tdbordercol = function(Proc: PDBPROCESS; Order: Integer): Integer; cdecl;
1202 Tdbreadtext = function(dbproc: PDBPROCESS; Buf: Pointer; BufSize: DBINT): DBINT; cdecl;
1203 Tdbresults = function(dbproc: PDBPROCESS): RETCODE; cdecl;
1204 Tdbretdata = function(dbproc: PDBPROCESS; RetNum: Integer): PByte; cdecl;
1205 Tdbretlen = function(dbproc: PDBPROCESS; RetNum: Integer): DBINT; cdecl;
1206 Tdbretname = function(Proc: PDBPROCESS; RetNum: Integer): PAnsiChar; cdecl;
1207 Tdbretstatus = function(Proc: PDBPROCESS): DBINT; cdecl;
1208 Tdbrettype = function(Proc: PDBPROCESS; RetNum: Integer): Integer; cdecl;
1209 Tdbrows = function(Proc: PDBPROCESS): RETCODE; cdecl; //!!!
1210 Tdbrowtype = function(Proc: PDBPROCESS): STATUS; cdecl;
1211 Tdbrpcinit = function(Proc: PDBPROCESS; ProcName: PAnsiChar; Options: DBSMALLINT):
1212 RETCODE; cdecl; //!!!
1213 Tdbrpcparam = function(Proc: PDBPROCESS; ParamName: PAnsiChar; Status: Byte;
1214 Typ: Integer; MaxLen, DataLen: DBINT; Value: PByte): RETCODE; cdecl;
1215 Tdbrpcsend = function(Proc: PDBPROCESS): RETCODE; cdecl;
1216 Tdbrpwclr = procedure(Login: PLOGINREC); cdecl;
1217 Tdbsetavail = procedure(Proc: PDBPROCESS); cdecl;
1218 Tdbsetlogintime = function(Seconds: Integer): RETCODE; cdecl;
1219 Tdbsetnull = function(Proc: PDBPROCESS; BindType, BindLen: Integer;
1220 BindVal: PByte): RETCODE; cdecl;
1221 Tdbsettime = function(Seconds: Integer): RETCODE; cdecl;
1222 Tdbsetuserdata = procedure(Proc: PDBPROCESS; Ptr: Pointer); cdecl;
1223 Tdbsqlexec = function(Proc: PDBPROCESS): RETCODE; cdecl;
1224 Tdbsqlok = function(Proc: PDBPROCESS): RETCODE; cdecl;
1225 Tdbsqlsend = function(Proc: PDBPROCESS): RETCODE; cdecl;
1226 Tdbstrcpy = function(Proc: PDBPROCESS; Start, NumBytes: Integer; Dest: PAnsiChar):
1228 Tdbstrlen = function(Proc: PDBPROCESS): Integer; cdecl;
1229 Tdbtabcount = function(Proc: PDBPROCESS): Integer; cdecl;
1230 Tdbtabname = function(Proc: PDBPROCESS; Table: Integer): PAnsiChar; cdecl;
1231 Tdbtabsource = function(Proc: PDBPROCESS; Column: Integer; TabNum: PInteger):
1233 Tdbtsnewlen = function(Proc: PDBPROCESS): Integer; cdecl;
1234 Tdbtsnewval = function(Proc: PDBPROCESS): PDBBINARY; cdecl;
1235 Tdbtsput = function(Proc: PDBPROCESS; NewTs: PDBBINARY; NewTsLen,
1236 TabNum: Integer; TableName: PAnsiChar): RETCODE; cdecl;
1237 Tdbtxptr = function(Proc: PDBPROCESS; Column: Integer): PDBBINARY; cdecl;
1238 Tdbtxtimestamp = function(Proc: PDBPROCESS; Column: Integer): PDBBINARY; cdecl;
1239 Tdbtxtsnewval = function(Proc: PDBPROCESS): PDBBINARY; cdecl;
1240 Tdbtxtsput = function(Proc: PDBPROCESS; NewTxts: PDBBINARY; Column: Integer):
1242 Tdbuse = function(Proc: PDBPROCESS; DbName: PAnsiChar): RETCODE; cdecl;
1243 Tdbwritetext = function(Proc: PDBPROCESS; ObjName: PAnsiChar; TextPtr: PDBBINARY;
1244 TextPtrLen: DBTINYINT; Timestamp: PDBBINARY; Log: LongBool; Size: DBINT;
1245 Text: PByte): RETCODE; cdecl;
1246 (* LOGINREC manipulation *)
1247 Tdbsetlname = function(Login: PLOGINREC; Value: PAnsiChar; Item: Integer): RETCODE; cdecl;
1249 Tbcp_batch = function(Proc: PDBPROCESS): DBINT; cdecl;
1250 Tbcp_bind = function(Proc: PDBPROCESS; VarAddr: PByte; PrefixLen: Integer;
1251 VarLen: DBINT; Terminator: PByte; TermLen, Typ, TableColumn: Integer):
1253 Tbcp_colfmt = function(Proc: PDBPROCESS; FileColumn: Integer; FileType: Byte;
1254 FilePrefixLen: Integer; FileColLen: DBINT; FileTerm: PByte; FileTermLen,
1255 TableColumn: Integer): RETCODE; cdecl;
1256 Tbcp_collen = function(Proc: PDBPROCESS; VarLen: DBINT; TableColumn: Integer):
1258 Tbcp_colptr = function(Proc: PDBPROCESS; ColPtr: PByte; TableColumn: Integer):
1260 Tbcp_columns = function(Proc: PDBPROCESS; FileColCount: Integer): RETCODE; cdecl;
1261 Tbcp_control = function(Proc: PDBPROCESS; Field: Integer; Value: DBINT):
1263 Tbcp_done = function(Proc: PDBPROCESS): DBINT; cdecl;
1264 Tbcp_exec = function(Proc: PDBPROCESS; RowsCopied: PDBINT): RETCODE; cdecl;
1265 Tbcp_init = function(Proc: PDBPROCESS; TableName, hFile, ErrFile: PAnsiChar;
1266 Direction: Integer): RETCODE; cdecl;
1267 Tbcp_moretext = function(Proc: PDBPROCESS; Size: DBINT; Text: PByte):
1269 Tbcp_readfmt = function(Proc: PDBPROCESS; FileName: PAnsiChar): RETCODE; cdecl;
1270 Tbcp_sendrow = function(Proc: PDBPROCESS): RETCODE; cdecl;
1271 Tbcp_setl = function(Login: PLOGINREC; Enable: LongBool): RETCODE; cdecl;
1272 Tbcp_writefmt = function(Proc: PDBPROCESS; FileName: PAnsiChar): RETCODE; cdecl;
1273 { Two-phase commit functions }
1274 Tabort_xact = function(Proc: PDBPROCESS; CommId: DBINT): RETCODE; cdecl;
1275 Tbuild_xact_string = procedure(XActName, Service: PAnsiChar; CommId: DBINT;
1276 Result: PAnsiChar); cdecl;
1277 Tclose_commit = procedure(Proc: PDBPROCESS); cdecl;
1278 Tcommit_xact = function(Proc: PDBPROCESS; CommId: DBINT): RETCODE; cdecl;
1279 Topen_commit = function(Login: PLOGINREC; ServerName: PAnsiChar): PDBPROCESS; cdecl;
1280 Tremove_xact = function(Proc: PDBPROCESS; CommId: DBINT; SiteCount: Integer):
1282 Tscan_xact = function(Proc: PDBPROCESS; CommId: DBINT): RETCODE; cdecl;
1283 Tstart_xact = function(Proc: PDBPROCESS; AppName, XActName: PAnsiChar;
1284 SiteCount: Integer): DBINT; cdecl;
1285 Tstat_xact = function(Proc: PDBPROCESS; CommId: DBINT): Integer; cdecl;
1289 {FreeTDS spezial API definitions}
1290 TFreeTDSdb12hour = function(Proc: PDBPROCESS; Language: PAnsiChar): DBBOOL; cdecl;
1291 TFreeTDSdbcolbrowse = function(Proc: PDBPROCESS; Column: Integer): DBBOOL; cdecl;
1292 TFreeTDSdbcursorbind = function(hCursor: PDBCURSOR; Col, VarType: Integer; VarLen, POutLen: DBINT;
1293 VarAddr: PByte; DBTYPEINFO: PDBTYPEINFO): RETCODE; cdecl;
1294 TFreeTDSdbcursorclose = procedure(DbHandle: PDBHANDLE); cdecl;
1295 TFreeTDSdbcursorcolinfo = function(hCursor: PDBCURSOR; Column: DBINT; ColName: PAnsiChar;
1296 ColType, ColLen, UserType: PDBINT): RETCODE; cdecl;
1297 TFreeTDSdbcursorfetch = function(hCursor: PDBCURSOR; FetchType, RowNum: DBINT): RETCODE; cdecl;
1298 TFreeTDSdbcursorinfo = function(hCursor: PDBCURSOR; nCols, nRows: PDBINT): RETCODE; cdecl;
1299 TFreeTDSdbcursoropen = function(Proc: PDBPROCESS; Sql: PAnsiChar; ScrollOpt,
1300 ConCurOpt: DBSHORT; nRows: DBUSMALLINT; PStatus: PDBINT): PDBCURSOR; cdecl;
1302 TFreeTDSdbaltbind_ps = function(dbproc: PDBPROCESS; ComputeId, Column: Integer; VarType: Integer; VarLen: DBINT; VarAddr: PByte; typinfo: PDBTYPEINFO): RETCODE;
1303 TFreeTDSdbbind_ps = function(dbproc: PDBPROCESS; Column, VarType, VarLen: Integer; VarAddr: PByte; typinfo: PDBTYPEINFO): RETCODE; cdecl;
1304 TFreeTDSdbbufsize = function(dbproc: PDBPROCESS): Integer; cdecl;
1305 TFreeTDSdbclose = procedure(dbproc: PDBPROCESS); cdecl;
1306 TFreeTDSdbtablecolinfo = function(dbproc: PDBPROCESS; Column: DBINT; DbColumn: PTDSDBCOL): RETCODE;
1307 TFreeTDSdbcolinfo = function(Handle: PDBHANDLE; Typ, Column, ComputeId: Integer; DbColumn: PTDSDBCOL): RETCODE; cdecl;
1308 TFreeTDSdbconvert_ps = function(dbproc: PDBPROCESS; SrcType: Integer; Src: PByte; SrcLen: DBINT; DestType: Integer; Dest: PByte; DestLen: DBINT; typinfo: PDBTYPEINFO): Integer; cdecl;
1309 TFreeTDSdbcount = function(dbproc: PDBPROCESS): DBINT; cdecl;
1310 TFreeTDSdbdatecmp = function(dbproc: PDBPROCESS; d1, d2: PTDS_DBDATEREC): Integer;
1311 TFreeTDSdbdatecrack = function(dbproc: PDBPROCESS; DateInfo: PTDS_DBDATEREC; DateType: PTDSDBDATETIME): RETCODE; cdecl;
1312 TFreeTDSdbdatlen = function(dbproc: PDBPROCESS; Column: Integer): DBINT; cdecl;
1313 TFreeTDSdbdead = function(dbproc: PDBPROCESS): DBBOOL; cdecl;
1314 TFreeTDSdbgetcharset = function(dbproc: PDBPROCESS): PAnsiChar;
1315 TFreeTDSdbgetlusername = function(login: PLOGINREC; name_buffer: PByte; buffer_len: Integer): Integer; cdecl;
1316 TFreeTDSdbgetmaxprocs = function: Integer; cdecl;
1317 TFreeTDSdbgetnatlanf = function(dbproc: PDBPROCESS): PAnsiChar; cdecl;
1318 TFreeTDSdbgetpacket = function(dbproc: PDBPROCESS): Integer; cdecl;
1319 TFreeTDSdbgetuserdata = function(dbproc: PDBPROCESS): PByte; cdecl;
1320 TFreeTDSdbhasretstat = function(dbproc: PDBPROCESS): DBBOOL; cdecl;
1321 TFreeTDSdbinit = function:RETCODE; cdecl;
1322 TFreeTDSdbiordesc = function(dbproc: PDBPROCESS): Integer; cdecl;
1323 TFreeTDSdbiowdesc = function(dbproc: PDBPROCESS): Integer; cdecl;
1324 TFreeTDSdbisavail = function(Proc: PDBPROCESS): DBBOOL; cdecl;
1325 TFreeTDSdbisopt = function(Proc: PDBPROCESS; Option: Integer; const Param: PAnsiChar): DBBOOL; cdecl;
1326 TFreeTDSdbloginfree = procedure(Login: PLOGINREC); cdecl;
1327 TFreeTDSdbmny4cmp = function(dbproc: PDBPROCESS; m1, m: PDBMONEY4): Integer; cdecl;
1328 TFreeTDSdbmnycmp = function(dbproc: PDBPROCESS; m1, m2: PDBMONEY): Integer; cdecl;
1329 TFreeTDSdbmny4add = function(dbproc: PDBPROCESS; m1, m2, sum: PDBMONEY4): RETCODE; cdecl;
1330 TFreeTDSdbmnydec = function(dbproc: PDBPROCESS; mnyptr: PDBMONEY): RETCODE; cdecl;
1331 TFreeTDSdbmnyinc = function(dbproc: PDBPROCESS; mnyptr: PDBMONEY): RETCODE; cdecl;
1332 TFreeTDSdbmnymaxpos = function(dbproc: PDBPROCESS; dest: PDBMONEY): RETCODE; cdecl;
1333 TFreeTDSdbmnymaxneg = function(dbproc: PDBPROCESS; dest: PDBMONEY): RETCODE; cdecl;
1334 TFreeTDSdbmny4minus = function(dbproc: PDBPROCESS; src, dest: PDBMONEY): RETCODE; cdecl;
1335 TFreeTDSdbmnyminus = function(dbproc: PDBPROCESS; src, dest: PDBMONEY): RETCODE; cdecl;
1336 TFreeTDSdbmny4sub = function(dbproc: PDBPROCESS; m1, m2, diff: PDBMONEY4): RETCODE; cdecl;
1337 TFreeTDSdbmnysub = function(dbproc: PDBPROCESS; m1, m2, diff: PDBMONEY): RETCODE; cdecl;
1338 TFreeTDSdbmny4copy = function(dbproc: PDBPROCESS; m1, m2: PDBMONEY4): RETCODE; cdecl;
1339 TFreeTDSdbmnycopy = function(dbproc: PDBPROCESS; src, dest: PDBMONEY): RETCODE; cdecl;
1340 TFreeTDSdbmny4zero = function(dbproc: PDBPROCESS; dest: PDBMONEY4): RETCODE; cdecl;
1341 TFreeTDSdbmnyzero = function(dbproc: PDBPROCESS; dest: PDBMONEY4): RETCODE; cdecl;
1342 TFreeTDSdbmonthname = function(dbproc: PDBPROCESS; language: PAnsiChar; monthnum: Integer; shortform: DBBOOL): PAnsiChar; cdecl;
1343 TFreeTDSdbopen = function(Login: PLOGINREC; const Server: PAnsiChar; msdblib: Integer): PDBPROCESS; cdecl;
1344 TFreeTDSdbrecftos = procedure(const FileName: PAnsiChar);
1345 TDRBUF = function(dbproc: PDBPROCESS): DBBOOL; cdecl;
1346 TFreeTDSdbresults_r = function(dbproc: PDBPROCESS; Recursive: Integer): RETCODE; cdecl;
1347 TFreeTDSdbsafestr = function(dbproc: PDBPROCESS; const Src: PAnsiChar; SrcLen: DBINT; Dest: PAnsiChar; DestLen: DBINT; QuoteType: integer): RETCODE; cdecl;
1348 TFreeTDSdbservcharset = function(dbproc: PDBPROCESS): PAnsiChar; cdecl;
1349 TFreeTDSdbsetdefcharset = function(Charset: PAnsiChar): RETCODE; cdecl;
1350 TFreeTDSdbsetifile = procedure(FileName: PAnsiChar); cdecl;
1351 TFreeTDSdbsetmaxprocs = function(MaxProcs: Integer): RETCODE; cdecl;
1352 TFreeTDSdbsetopt = function(dbproc: PDBPROCESS; Option: DBINT; Param: PAnsiChar; int_param: DBINT): RETCODE; cdecl;
1353 TFreeTDSdbsetrow = function(dbproc: PDBPROCESS; Row: DBINT): STATUS; cdecl;
1354 TFreeTDSdbsetversion = function(Version: DBINT): RETCODE; cdecl;
1355 TFreeTDSdbspid = function(dbproc: PDBPROCESS): Integer; cdecl;
1356 TFreeTDSdbspr1row = function(dbproc: PDBPROCESS; Buffer: PAnsiChar; buf_len: DBINT): RETCODE; cdecl;
1357 TFreeTDSdbspr1rowlen = function(dbproc: PDBPROCESS): DBINT; cdecl;
1358 TFreeTDSdbsprhead = function(dbproc: PDBPROCESS; Buffer: PAnsiChar; buf_len: DBINT): RETCODE; cdecl;
1359 TFreeTDSdbsprline = function(dbproc: PDBPROCESS; Buffer: PAnsiChar; buf_len: DBINT; line_char: DBCHAR): RETCODE; cdecl;
1360 TFreeTDSdbvarylen = function(dbproc: PDBPROCESS; Column: Integer): DBINT; cdecl;
1361 TFreeTDSdbtds = function(dbproc: PDBPROCESS): DBINT; cdecl;
1362 TFreeTDSdbtextsize = function(dbproc: PDBPROCESS): DBINT; cdecl;
1363 TFreeTDSdbwillconvert = function(SrcType, DestType: Integer): DBBOOL; cdecl;
1364 TFreeTDSdbtabbrowse = function(Proc: PDBPROCESS; TabNum: Integer): LongBool; cdecl;
1365 (* LOGINREC manipulation *)
1366 TFreeTDSdbsetlbool = function(Login: PLOGINREC; Value, Item: Integer): RETCODE; cdecl;
1367 TFreeTDSdbsetllong = function(Login: PLOGINREC; Value, Item: Integer): RETCODE; cdecl;
1368 TFreeTDSdbsetlversion = function(Login: PLOGINREC; Version: Byte): RETCODE; cdecl;
1369 Ttdsdump_on = procedure ; cdecl;
1370 Ttdsdump_off = procedure ; cdecl;
1371 Ttdsdump_open = function (FileName : PAnsiChar): Integer; cdecl;
1372 Ttdsdump_close = procedure ; cdecl;
1373 T_tds_socket_init = procedure ; cdecl;
1374 T_tds_socket_done = procedure ; cdecl;
1378 void dbpivot_count (struct col_t *output, const struct col_t *input);
1379 void dbpivot_sum (struct col_t *output, const struct col_t *input);
1380 void dbpivot_min (struct col_t *output, const struct col_t *input);
1381 void dbpivot_max (struct col_t *output, const struct col_t *input);
1384 typedef void (*DBPIVOT_FUNC)(struct col_t *output, const struct col_t *input);
1385 struct pivot_t * dbrows_pivoted(DBPROCESS *dbproc);
1386 STATUS dbnextrow_pivoted(DBPROCESS *dbproc, struct pivot_t *pp);
1387 RETCODE dbpivot(DBPROCESS *dbproc, int nkeys, int *keys, int ncols, int *cols, DBPIVOT_FUNC func, int val);
1389 DBPIVOT_FUNC dbpivot_lookup_name( const char name[] );
1391 //TFreeTDSdbsechandle = function(_Type: DBINT ; Handler: INTFUNCPTR): PRETCODE; cdecl;
1392 //TFreeTDSdbsetbusy = procedure(dbproc: PDBPROCESS; BusyFunc: DB_DBBUSY_FUNC); cdecl;
1393 //TFreeTDSdbsetinterrupt = procedure(dbproc: PDBPROCESS; chkintr: DB_DBCHKINTR_FUNC; hndlintr: DB_DBHNDLINTR_FUNC);
1397 {MsSQL-spezial API definitions}
1399 { Standard DB-Library functions }
1400 TMsSQLdbclose = function(Proc: PDBPROCESS): RETCODE; cdecl;
1401 TMsSQLdbcolbrowse = function(Proc: PDBPROCESS; Column: Integer): LongBool; cdecl;
1402 TMsSQLdbcolinfo = function(Handle: PDBHANDLE; Typ, Column, ComputeId: Integer;
1403 DbColumn: PDBCOL): RETCODE; cdecl;
1404 TMsSQLdbcount = function(Proc: PDBPROCESS): Integer; cdecl;
1406 TMsSQLdbcursorbind = function(hCursor: PDBCURSOR; Col, VarType: Integer; VarLen: DBINT;
1407 POutLen: PDBINT; VarAddr: PByte): RETCODE; cdecl;
1408 TMsSQLdbcursorclose = function(DbHandle: PDBHANDLE): RETCODE; cdecl;
1409 TMsSQLdbcursorcolinfo = function(hCursor: PDBCURSOR; Column: Integer; ColName: PAnsiChar;
1410 ColType: PInteger; ColLen: PDBINT; UserType: PInteger): RETCODE; cdecl;
1411 TMsSQLdbcursorfetch = function(hCursor: PDBCURSOR; FetchType, RowNum: Integer): RETCODE; cdecl;
1412 TMsSQLdbcursorfetchex = function(hCursor: PDBCURSOR; FetchType: Integer; RowNum,
1413 nFetchRows, Reserved: DBINT): RETCODE; cdecl;
1414 TMsSQLdbcursorinfo = function(hCursor: PDBCURSOR; nCols: PInteger; nRows: PDBINT):
1416 TMsSQLdbcursorinfoex = function(hCursor: PDBCURSOR; DbCursorInfo: PDBCURSORINFO):
1418 TMsSQLdbcursoropen = function(Proc: PDBPROCESS; Sql: PAnsiChar; ScrollOpt,
1419 ConCurOpt: Integer; nRows: Cardinal; PStatus: PDBINT): PDBCURSOR; cdecl;
1420 TMsSQLdbdataready = function(Proc: PDBPROCESS): LongBool; cdecl;
1421 TMsSQLdbdatecrack = function(Proc: PDBPROCESS; DateInfo: PDBDATEREC;
1422 DateType: PDBDATETIME): RETCODE; cdecl;
1423 TMsSQLdbdatlen = function(Proc: PDBPROCESS; Column: Integer): Integer; cdecl;
1424 TMsSQLdbdead = function(Proc: PDBPROCESS): LongBool; cdecl;
1425 TMsSQLdbWinexit = procedure; cdecl;
1426 TMsSQLdbenlisttrans = function(Proc: PDBPROCESS; Transaction: Pointer): RETCODE; cdecl;
1427 TMsSQLdbenlistxatrans = function(Proc: PDBPROCESS; EnlistTran: LongBool): RETCODE; cdecl;
1428 TMsSQLdbgetmaxprocs = function: SmallInt; cdecl;
1429 TMsSQLdbgetpacket = function(Proc: PDBPROCESS): Cardinal; cdecl;
1430 TMsSQLdbgetuserdata = function(Proc: PDBPROCESS): Pointer; cdecl;
1431 TMsSQLdbhasretstat = function(Proc: PDBPROCESS): LongBool; cdecl;
1432 TMsSQLdbinit = function: PAnsiChar; cdecl;
1433 TMsSQLdbisavail = function(Proc: PDBPROCESS): LongBool; cdecl;
1434 TMsSQLdbisopt = function(Proc: PDBPROCESS; Option: Integer; Param: PAnsiChar): LongBool; cdecl;
1435 TMsSQLdbfreelogin = procedure(Login: PLOGINREC); cdecl;
1436 TMsSQLdbprocinfo = function(Proc: PDBPROCESS; DbProcInfo: PDBPROCINFO): RETCODE; cdecl;
1437 TMsSQLdbrpcexec = function(Proc: PDBPROCESS): RETCODE; cdecl;
1438 TMsSQLdbserverenum = function(SearchMode: Word; ServNameBuf: PAnsiChar;
1439 ServNameBufSize: Word; NumEntries: PWord): Integer; cdecl;
1440 TMsSQLdbsetmaxprocs = function(MaxProcs: SmallInt): RETCODE; cdecl;
1441 TMsSQLdbsetlpacket = function(Login: PLOGINREC; PacketSize: Word): RETCODE; cdecl; //TDS: dbsetllong
1442 TMsSQLdbsetopt = function(Proc: PDBPROCESS; Option: Integer; Param: PAnsiChar):
1444 TMsSQLdbtabbrowse = function(Proc: PDBPROCESS; TabNum: Integer): LongBool; cdecl;
1446 TMsSQLdbvarylen = function(Proc: PDBPROCESS; Column: Integer): LongBool; cdecl;
1447 TMsSQLdbwillconvert = function(SrcType, DestType: Integer): LongBool; cdecl;
1448 TMsSQLdbupdatetext = function(Proc: PDBPROCESS; DestObject: PAnsiChar; DestTextPtr,
1449 DestTimestamp: PDBBINARY; UpdateType: Integer; InsertOffset,
1450 DeleteLength: DBINT; SrcObject: PAnsiChar; SrcSize: DBINT; SrcText: PDBBINARY):
1453 {************* Plain API Function variables definition ************}
1455 {Sybase API definitions}
1457 SYBDBERRHANDLE_PROC = function(Proc: PDBPROCESS; Severity, DbErr, OsErr: Integer;
1458 DbErrStr, OsErrStr: PAnsiChar): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1459 SYBDBMSGHANDLE_PROC = function(Proc: PDBPROCESS; MsgNo: DBINT; MsgState,
1460 Severity: Integer; MsgText, SrvName, ProcName: PAnsiChar; Line: DBUSMALLINT):
1461 Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1463 TSybdb12hour = function(Proc: PDBPROCESS; Language: PAnsiChar): DBBOOL; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1465 TSybdberrhandle = function(Handler: SYBDBERRHANDLE_PROC): SYBDBERRHANDLE_PROC; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1466 TSybdbmsghandle = function(Handler: SYBDBMSGHANDLE_PROC): SYBDBMSGHANDLE_PROC; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1468 { Two-phase commit functions }
1469 TSybabort_xact = function(Proc: PDBPROCESS; CommId: DBINT): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1470 TSybbuild_xact_string = procedure(XActName, Service: PAnsiChar; CommId: DBINT;
1471 Result: PAnsiChar); {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1472 TSybclose_commit = procedure(Proc: PDBPROCESS); {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1473 TSybcommit_xact = function(Proc: PDBPROCESS; CommId: DBINT): RETCODE; {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1474 TSybopen_commit = function(Login: PLOGINREC; ServerName: PAnsiChar): PDBPROCESS; {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1475 TSybremove_xact = function(Proc: PDBPROCESS; CommId: DBINT; SiteCount: Integer): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1476 TSybscan_xact = function(Proc: PDBPROCESS; CommId: DBINT): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1477 TSybstart_xact = function(Proc: PDBPROCESS; AppName, XActName: PAnsiChar;
1478 SiteCount: Integer): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1479 TSybstat_xact = function(Proc: PDBPROCESS; CommId: DBINT): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1482 TSybbcp_batch = function(Proc: PDBPROCESS): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1483 TSybbcp_bind = function(Proc: PDBPROCESS; VarAddr: PByte; PrefixLen: Integer;
1484 VarLen: DBINT; Terminator: PByte; TermLen, Typ, TableColumn: Integer):
1485 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1486 TSybbcp_colfmt = function(Proc: PDBPROCESS; FileColumn: Integer; FileType: Byte;
1487 FilePrefixLen: Integer; FileColLen: DBINT; FileTerm: PByte; FileTermLen,
1488 TableColumn: Integer): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1489 TSybbcp_collen = function(Proc: PDBPROCESS; VarLen: DBINT; TableColumn: Integer):
1490 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1491 TSybbcp_colptr = function(Proc: PDBPROCESS; ColPtr: PByte; TableColumn: Integer):
1492 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1493 TSybbcp_columns = function(Proc: PDBPROCESS; FileColCount: Integer): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1494 TSybbcp_control = function(Proc: PDBPROCESS; Field: Integer; Value: DBINT):
1495 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1496 TSybbcp_done = function(Proc: PDBPROCESS): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1497 TSybbcp_exec = function(Proc: PDBPROCESS; RowsCopied: PDBINT): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1498 TSybbcp_init = function(Proc: PDBPROCESS; TableName, hFile, ErrFile: PAnsiChar;
1499 Direction: Integer): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1500 TSybbcp_moretext = function(Proc: PDBPROCESS; Size: DBINT; Text: PByte):
1501 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1502 TSybbcp_readfmt = function(Proc: PDBPROCESS; FileName: PAnsiChar): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1503 TSybbcp_sendrow = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1504 TSybbcp_writefmt = function(Proc: PDBPROCESS; FileName: PAnsiChar): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1506 { Standard DB-Library functions }
1507 TSybdbadata = function(Proc: PDBPROCESS; ComputeId, Column: Integer): PByte; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1508 TSybdbadlen = function(Proc: PDBPROCESS; ComputeId, Column: Integer): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1509 TSybdbaltbind = function(Proc: PDBPROCESS; ComputeId, Column: Integer;
1510 VarType: Integer; VarLen: DBINT; VarAddr: PByte): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1511 TSybdbaltcolid = function(Proc: PDBPROCESS; ComputeId, Column: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1512 TSybdbaltlen = function(Proc: PDBPROCESS; ComputeId, Column: Integer): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1513 TSybdbaltop = function(Proc: PDBPROCESS; ComputeId, Column: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1514 TSybdbalttype = function(Proc: PDBPROCESS; ComputeId, Column: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1515 TSybdbaltutype = function(Proc: PDBPROCESS; ComputeId, Column: Integer): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1516 TSybdbanullbind = function(Proc: PDBPROCESS; ComputeId, Column: Integer;
1517 Indicator: PDBINT): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1518 TSybdbbind = function(Proc: PDBPROCESS; Column, VarType, VarLen: Integer;
1519 VarAddr: PByte): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1520 TSybdbbylist = function(Proc: PDBPROCESS; ComputeId: Integer; Size: PInteger):
1521 PByte; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1522 TSybdbcancel = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1523 TSybdbcanquery = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1524 TSybdbchange = function(Proc: PDBPROCESS): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1525 TSybdbclose = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1526 TSybdbclrbuf = procedure(Proc: PDBPROCESS; N: DBINT); {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1527 TSybdbclropt = function(Proc: PDBPROCESS; Option: Integer; Param: PAnsiChar): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1528 TSybdbcmd = function(Proc: PDBPROCESS; Cmd: PAnsiChar): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1529 TSybdbcmdrow = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1530 TSybdbcolbrowse = function(Proc: PDBPROCESS; Column: Integer): LongBool; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1531 TSybdbcollen = function(Proc: PDBPROCESS; Column: Integer): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1532 TSybdbcolname = function(Proc: PDBPROCESS; Column: Integer): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1533 TSybdbcolsource = function(Proc: PDBPROCESS; Column: Integer): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1534 // TSybdbcoltypeinfo = function(Proc: PDBPROCESS; Column: Integer): PDBTYPEINFO; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1535 TSybdbcoltype = function(Proc: PDBPROCESS; Column: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1536 TSybdbcolutype = function(Proc: PDBPROCESS; Column: Integer): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1537 TSybdbconvert = function(Proc: PDBPROCESS; SrcType: Integer; Src: PByte;
1538 SrcLen: DBINT; DestType: Integer; Dest: PByte; DestLen: DBINT): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1539 TSybdbcount = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1540 TSybdbcurcmd = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1541 TSybdbcurrow = function(Proc: PDBPROCESS): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1543 TSybdbcursor = function(hCursor: PDBCURSOR; OpType, Row: Integer; Table,
1544 Values: PAnsiChar): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1545 TSybdbcursorbind = function(hCursor: PDBCURSOR; Col, VarType: Integer; VarLen: DBINT;
1546 POutLen: PDBINT; VarAddr: PByte): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1547 TSybdbcursorclose = function(DbHandle: PDBHANDLE): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1548 TSybdbcursorcolinfo = function(hCursor: PDBCURSOR; Column: Integer; ColName: PAnsiChar;
1549 ColType: PInteger; ColLen: PDBINT; UserType: PInteger): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1550 TSybdbcursorfetch = function(hCursor: PDBCURSOR; FetchType, RowNum: Integer):
1551 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1552 TSybdbcursorinfo = function(hCursor: PDBCURSOR; nCols: PInteger; nRows: PDBINT):
1553 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1554 TSybdbcursoropen = function(Proc: PDBPROCESS; Sql: PAnsiChar; ScrollOpt,
1555 ConCurOpt: Integer; nRows: Cardinal; PStatus: PDBINT): PDBCURSOR; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1556 TSybdbdata = function(Proc: PDBPROCESS; Column: Integer): PByte; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1557 TSybdbdatecrack = function(Proc: PDBPROCESS; DateInfo: PDBDATEREC;
1558 DateType: PDBDATETIME): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1559 TSybdbdatlen = function(Proc: PDBPROCESS; Column: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1560 TSybdbdead = function(Proc: PDBPROCESS): LongBool; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1561 TSybdbexit = procedure; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1562 TSybdbfcmd = function(Proc: PDBPROCESS; CmdString: PAnsiChar; var Params): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1563 TSybdbfirstrow = function(Proc: PDBPROCESS): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1564 TSybdbfreebuf = procedure(Proc: PDBPROCESS); {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1565 TSybdbloginfree = procedure(Login: PLOGINREC); {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1566 TSybdbfreequal = procedure(Ptr: PAnsiChar); {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1567 TSybdbgetchar = function(Proc: PDBPROCESS; N: Integer): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1568 TSybdbgetmaxprocs = function: SmallInt; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1569 TSybdbgetoff = function(Proc: PDBPROCESS; OffType: DBUSMALLINT;
1570 StartFrom: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1571 TSybdbgetpacket = function(Proc: PDBPROCESS): Cardinal; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1572 TSybdbgetrow = function(Proc: PDBPROCESS; Row: DBINT): STATUS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1573 TSybdbgetuserdata = function(Proc: PDBPROCESS): Pointer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1574 TSybdbhasretstat = function(Proc: PDBPROCESS): LongBool; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1575 TSybdbinit = function: RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1576 TSybdbisavail = function(Proc: PDBPROCESS): LongBool; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1577 TSybdbisopt = function(Proc: PDBPROCESS; Option: Integer; Param: PAnsiChar): LongBool; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1578 TSybdblastrow = function(Proc: PDBPROCESS): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1579 TSybdblogin = function: PLOGINREC; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1580 TSybdbmorecmds = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1581 TSybdbmoretext = function(Proc: PDBPROCESS; Size: DBINT; Text: PByte): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1582 TSybdbname = function(Proc: PDBPROCESS): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1583 TSybdbnextrow = function(Proc: PDBPROCESS): STATUS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1584 TSybdbnullbind = function(Proc: PDBPROCESS; Column: Integer; Indicator: PDBINT):
1585 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1586 TSybdbnumalts = function(Proc: PDBPROCESS; ComputeId: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1587 TSybdbnumcols = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1588 TSybdbnumcompute = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1589 TSybdbnumorders = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1590 TSybdbnumrets = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1591 TSybdbopen = function(Login: PLOGINREC; Host: PAnsiChar): PDBPROCESS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1592 TSybdbordercol = function(Proc: PDBPROCESS; Order: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1593 TSybdbprhead = procedure(Proc: PDBPROCESS); {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1594 TSybdbprrow = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1595 TSybdbprtype = function(Token: Integer): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1596 TSybdbqual = function(Proc: PDBPROCESS; TabNum: Integer; TabName: PAnsiChar): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1597 TSybdbreadtext = function(Proc: PDBPROCESS; Buf: Pointer; BufSize: DBINT): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1598 TSybdbresults = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1599 TSybdbretdata = function(Proc: PDBPROCESS; RetNum: Integer): PByte; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1600 TSybdbretlen = function(Proc: PDBPROCESS; RetNum: Integer): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1601 TSybdbretname = function(Proc: PDBPROCESS; RetNum: Integer): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1602 TSybdbretstatus = function(Proc: PDBPROCESS): DBINT; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1603 TSybdbrettype = function(Proc: PDBPROCESS; RetNum: Integer): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1604 TSybdbrows = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF}; //!!!
1605 TSybdbrowtype = function(Proc: PDBPROCESS): STATUS; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1606 TSybdbrpcinit = function(Proc: PDBPROCESS; ProcName: PAnsiChar; Options: DBSMALLINT): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF}; //!!!
1607 TSybdbrpcparam = function(Proc: PDBPROCESS; ParamName: PAnsiChar; Status: Byte;
1608 Typ: Integer; MaxLen, DataLen: DBINT; Value: PByte): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1609 TSybdbrpcsend = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1611 TSybdbrpwclr = procedure(Login: PLOGINREC); {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1612 TSybdbsetavail = procedure(Proc: PDBPROCESS); {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1613 TSybdbsetmaxprocs = function(MaxProcs: SmallInt): RETCODE; {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1614 TSybdbsetlname = function(Login: PLOGINREC; Value: PAnsiChar; Item: Integer): RETCODE; {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1615 TSybdbsetlogintime = function(Seconds: Integer): RETCODE; {$IFNDEF UNIX}stdcall{$ELSE}cdecl{$ENDIF};
1617 TSybdbsetnull = function(Proc: PDBPROCESS; BindType, BindLen: Integer;
1618 BindVal: PByte): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1619 TSybdbsetopt = function(Proc: PDBPROCESS; Option: Integer; CharParam: PAnsiChar; IntParam: Integer):
1620 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1621 TSybdbsettime = function(Seconds: Integer): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1622 TSybdbsetuserdata = procedure(Proc: PDBPROCESS; Ptr: Pointer); {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1623 TSybdbsqlexec = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1624 TSybdbsqlok = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1625 TSybdbsqlsend = function(Proc: PDBPROCESS): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1626 TSybdbstrcpy = function(Proc: PDBPROCESS; Start, NumBytes: Integer; Dest: PAnsiChar):
1627 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1628 TSybdbstrlen = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1629 TSybdbtabbrowse = function(Proc: PDBPROCESS; TabNum: Integer): LongBool; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1630 TSybdbtabcount = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1631 TSybdbtabname = function(Proc: PDBPROCESS; Table: Integer): PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1632 TSybdbtabsource = function(Proc: PDBPROCESS; Column: Integer; TabNum: PInteger):
1633 PAnsiChar; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1634 TSybdbtsnewlen = function(Proc: PDBPROCESS): Integer; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1635 TSybdbtsnewval = function(Proc: PDBPROCESS): PDBBINARY; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1636 TSybdbtsput = function(Proc: PDBPROCESS; NewTs: PDBBINARY; NewTsName,
1637 TabNum: Integer; TableName: PAnsiChar): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1638 TSybdbtxptr = function(Proc: PDBPROCESS; Column: Integer): PDBBINARY; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1639 TSybdbtxtimestamp = function(Proc: PDBPROCESS; Column: Integer): PDBBINARY; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1640 TSybdbtxtsnewval = function(Proc: PDBPROCESS): PDBBINARY; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1641 TSybdbtxtsput = function(Proc: PDBPROCESS; NewTxts: PDBBINARY; Column: Integer):
1642 RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1643 TSybdbuse = function(Proc: PDBPROCESS; DbName: PAnsiChar): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1644 TSybdbvarylen = function(Proc: PDBPROCESS; Column: Integer): LongBool; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1645 TSybdbwillconvert = function(SrcType, DestType: Integer): LongBool; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1646 TSybdbwritetext = function(Proc: PDBPROCESS; ObjName: PAnsiChar; TextPtr: PDBBINARY;
1647 TextPtrLen: DBTINYINT; Timestamp: PDBBINARY; Log: LongBool; Size: DBINT;
1648 Text: PByte): RETCODE; {$IFNDEF UNIX} stdcall {$ELSE} cdecl {$ENDIF};
1651 dberrhandle : Tdberrhandle;
1652 dbmsghandle : Tdbmsghandle;
1654 dbprocerrhandle : Tdbprocerrhandle;
1655 dbprocmsghandle : Tdbprocmsghandle;
1657 { Two-phase commit functions }
1658 abort_xact : Tabort_xact;
1659 build_xact_string : Tbuild_xact_string;
1660 close_commit : Tclose_commit;
1661 commit_xact : Tcommit_xact;
1662 open_commit : Topen_commit;
1663 remove_xact : Tremove_xact;
1664 scan_xact : Tscan_xact;
1665 start_xact : Tstart_xact;
1666 stat_xact : Tstat_xact;
1669 bcp_batch : Tbcp_batch;
1670 bcp_bind : Tbcp_bind;
1671 bcp_colfmt : Tbcp_colfmt;
1672 bcp_collen : Tbcp_collen;
1673 bcp_colptr : Tbcp_colptr;
1674 bcp_columns : Tbcp_columns;
1675 bcp_control : Tbcp_control;
1676 bcp_done : Tbcp_done;
1677 bcp_exec : Tbcp_exec;
1678 bcp_init : Tbcp_init;
1679 bcp_moretext : Tbcp_moretext;
1680 bcp_readfmt : Tbcp_readfmt;
1681 bcp_sendrow : Tbcp_sendrow;
1682 bcp_setl : Tbcp_setl;
1683 bcp_writefmt : Tbcp_writefmt;
1686 dbaltbind : Tdbaltbind;
1687 dbaltcolid : Tdbaltcolid;
1688 dbaltlen : Tdbaltlen;
1690 dbalttype : Tdbalttype;
1691 dbaltutype : Tdbaltutype;
1692 dbanullbind : Tdbanullbind;
1694 dbbylist : Tdbbylist;
1695 dbcancel : Tdbcancel;
1696 dbcanquery : Tdbcanquery;
1697 dbchange : Tdbchange;
1698 dbclrbuf : Tdbclrbuf;
1699 dbclropt : Tdbclropt;
1701 dbcmdrow : Tdbcmdrow;
1702 dbcollen : Tdbcollen;
1703 dbcolname : Tdbcolname;
1704 dbcolsource : Tdbcolsource;
1705 dbcoltype : Tdbcoltype;
1706 dbcolutype : Tdbcolutype;
1707 dbconvert : Tdbconvert;
1708 dbcurcmd : Tdbcurcmd;
1709 dbcurrow : Tdbcurrow;
1710 dbcursor : Tdbcursor;
1714 dbfirstrow : Tdbfirstrow;
1715 dbfreebuf : Tdbfreebuf;
1716 dbfreequal : Tdbfreequal;
1717 dbgetchar : Tdbgetchar;
1718 dbgetoff : Tdbgetoff;
1719 dbgetrow : Tdbgetrow;
1720 dbgettime : Tdbgettime;
1721 dbiscount : Tdbiscount;
1722 dblastrow : Tdblastrow;
1724 dbmorecmds : Tdbmorecmds;
1725 dbmoretext : Tdbmoretext;
1727 dbnextrow : Tdbnextrow;
1728 dbnullbind : Tdbnullbind;
1729 dbnumalts : Tdbnumalts;
1730 dbnumcols : Tdbnumcols;
1731 dbnumcompute : Tdbnumcompute;
1732 dbnumorders : Tdbnumorders;
1733 dbnumrets : Tdbnumrets;
1735 dbordercol : Tdbordercol;
1736 dbprhead : Tdbprhead;
1738 dbprtype : Tdbprtype;
1740 dbreadtext : Tdbreadtext;
1741 dbresults : Tdbresults;
1742 dbretdata : Tdbretdata;
1743 dbretlen : Tdbretlen;
1744 dbretname : Tdbretname;
1745 dbretstatus : Tdbretstatus;
1746 dbrettype : Tdbrettype;
1748 dbrowtype : Tdbrowtype;
1749 dbrpcinit : Tdbrpcinit;
1750 dbrpcparam : Tdbrpcparam;
1751 dbrpcsend : Tdbrpcsend;
1752 dbrpwclr : Tdbrpwclr;
1753 dbsetavail : Tdbsetavail;
1754 dbsetlname : Tdbsetlname;
1755 dbsetlogintime : Tdbsetlogintime;
1756 dbsetnull : Tdbsetnull;
1757 dbsettime : Tdbsettime;
1758 dbsetuserdata : Tdbsetuserdata;
1759 dbsqlexec : Tdbsqlexec;
1761 dbsqlsend : Tdbsqlsend;
1762 dbstrcpy : Tdbstrcpy;
1763 dbstrlen : Tdbstrlen;
1764 dbtabcount : Tdbtabcount;
1765 dbtabname : Tdbtabname;
1766 dbtabsource : Tdbtabsource;
1767 dbtsnewlen : Tdbtsnewlen;
1768 dbtsnewval : Tdbtsnewval;
1771 dbtxtimestamp : Tdbtxtimestamp;
1772 dbtxtsnewval : Tdbtxtsnewval;
1773 dbtxtsput : Tdbtxtsput;
1775 dbwritetext : Tdbwritetext;
1778 TFreeTDSAPI = Record
1779 {available but not implemented}
1780 db12hour: TFreeTDSdb12hour; {no MS}
1781 dbcolbrowse: TFreeTDSdbcolbrowse;
1782 dbcursorbind: TFreeTDSdbcursorbind;
1783 dbcursorclose: TFreeTDSdbcursorclose;
1784 dbcursorcolinfo:TFreeTDSdbcursorcolinfo;
1785 dbcursorfetch: TFreeTDSdbcursorfetch;
1786 dbcursorinfo: TFreeTDSdbcursorinfo;
1789 dbaltbind_ps: TFreeTDSdbaltbind_ps;
1790 dbbind_ps: TFreeTDSdbbind_ps;
1791 dbbufsize: TFreeTDSdbbufsize;
1792 dbclose: TFreeTDSdbclose;
1793 dbtablecolinfo: TFreeTDSdbtablecolinfo;
1794 dbcolinfo: TFreeTDSdbcolinfo;
1795 dbconvert_ps: TFreeTDSdbconvert_ps;
1796 dbcount: TFreeTDSdbcount;
1797 dbdatecmp: TFreeTDSdbdatecmp;
1798 dbdatecrack: TFreeTDSdbdatecrack;
1799 dbdatlen: TFreeTDSdbdatlen;
1800 dbdead: TFreeTDSdbdead;
1802 dbgetcharset: TFreeTDSdbgetcharset;
1803 dbgetlusername: TFreeTDSdbgetlusername;
1804 dbgetmaxprocs: TMsSQLdbgetmaxprocs;
1805 dbgetnatlanf: TFreeTDSdbgetnatlanf;
1806 dbgetpacket: TFreeTDSdbgetpacket;
1807 dbgetuserdata: TFreeTDSdbgetuserdata;
1808 dbhasretstat: TFreeTDSdbhasretstat;
1809 dbinit: TFreeTDSdbinit;
1810 dbiordesc: TFreeTDSdbiordesc;
1811 dbiowdesc: TFreeTDSdbiowdesc;
1812 dbisavail: TFreeTDSdbisavail;
1813 dbisopt: TFreeTDSdbisopt;
1814 dbloginfree: TFreeTDSdbloginfree;
1815 dbmny4cmp: TFreeTDSdbmny4cmp;
1816 dbmnycmp: TFreeTDSdbmnycmp;
1817 dbmny4add: TFreeTDSdbmny4add;
1818 dbmnydec: TFreeTDSdbmnydec;
1819 dbmnyinc: TFreeTDSdbmnyinc;
1820 dbmnymaxpos: TFreeTDSdbmnymaxpos;
1821 dbmnymaxneg: TFreeTDSdbmnymaxneg;
1822 dbmny4minus: TFreeTDSdbmny4minus;
1823 dbmnyminus: TFreeTDSdbmnyminus;
1824 dbmny4sub: TFreeTDSdbmny4sub;
1825 dbmnysub: TFreeTDSdbmnysub;
1826 dbmny4copy: TFreeTDSdbmny4copy;
1827 dbmnycopy: TFreeTDSdbmnycopy;
1828 dbmny4zero: TFreeTDSdbmny4zero;
1829 dbmnyzero: TFreeTDSdbmnyzero;
1830 dbmonthname: TFreeTDSdbmonthname;
1831 tdsdbopen: TFreeTDSdbopen;
1833 { pivot functions */
1834 void dbpivot_count (struct col_t *output, const struct col_t *input);
1835 void dbpivot_sum (struct col_t *output, const struct col_t *input);
1836 void dbpivot_min (struct col_t *output, const struct col_t *input);
1837 void dbpivot_max (struct col_t *output, const struct col_t *input);
1840 typedef void (*DBPIVOT_FUNC)(struct col_t *output, const struct col_t *input);
1841 struct pivot_t * dbrows_pivoted(DBPROCESS *dbproc);
1842 STATUS dbnextrow_pivoted(DBPROCESS *dbproc, struct pivot_t *pp);
1843 RETCODE dbpivot(DBPROCESS *dbproc, int nkeys, int *keys, int ncols, int *cols, DBPIVOT_FUNC func, int val);
1845 DBPIVOT_FUNC dbpivot_lookup_name( const char name[] );
1848 dbrecftos: TFreeTDSdbrecftos;
1849 dbresults_r: TFreeTDSdbresults_r;
1850 dbsafestr: TFreeTDSdbsafestr;
1851 //dbsechandle: TFreeTDSdbsechandle;
1852 dbservcharset: TFreeTDSdbservcharset;
1853 //dbsetbusy: TFreeTDSdbsetbusy;
1854 dbsetdefcharset:TFreeTDSdbsetdefcharset;
1855 dbsetifile: TFreeTDSdbsetifile;
1856 //dbsetinterrupt: TFreeTDSdbsetinterrupt;
1857 dbsetmaxprocs: TMsSQLdbsetmaxprocs;
1858 dbsetopt: TFreeTDSdbsetopt;
1859 dbsetrow: TFreeTDSdbsetrow;
1860 dbsetversion: TFreeTDSdbsetversion;
1861 dbspid: TFreeTDSdbspid;
1862 dbspr1row: TFreeTDSdbspr1row;
1863 dbspr1rowlen: TFreeTDSdbspr1rowlen;
1864 dbsprhead: TFreeTDSdbsprhead;
1865 dbsprline: TFreeTDSdbsprline;
1866 dbvarylen: TFreeTDSdbvarylen;
1868 dbtds: TFreeTDSdbtds;
1869 dbtextsize: TFreeTDSdbtextsize;
1870 dbwillconvert: TFreeTDSdbwillconvert;
1871 dbsetlbool: TFreeTDSdbsetlbool;
1872 dbsetllong: TFreeTDSdbsetllong;
1873 dbsetlversion: TFreeTDSdbsetlversion;
1875 tdsdump_on : Ttdsdump_on;
1876 tdsdump_off : Ttdsdump_off;
1877 tdsdump_open : Ttdsdump_open;
1878 tdsdump_close : Ttdsdump_close;
1879 _tds_socket_init : T_tds_socket_init;
1880 _tds_socket_done : T_tds_socket_done;
1885 { Standard DB-Library functions }
1886 dbclose : TMsSQLdbclose;
1887 dbcolbrowse : TMsSQLdbcolbrowse;
1888 dbcolinfo : TMsSQLdbcolinfo;
1889 dbcount : TMsSQLdbcount;
1891 dbcursorbind : TMsSQLdbcursorbind;
1892 dbcursorclose : TMsSQLdbcursorclose;
1893 dbcursorcolinfo : TMsSQLdbcursorcolinfo;
1894 dbcursorfetch : TMsSQLdbcursorfetch;
1895 dbcursorfetchex : TMsSQLdbcursorfetchex;
1896 dbcursorinfo : TMsSQLdbcursorinfo;
1897 dbcursorinfoex : TMsSQLdbcursorinfoex;
1898 dbcursoropen : TMsSQLdbcursoropen;
1899 dbdataready : TMsSQLdbdataready;
1900 dbdatecrack : TMsSQLdbdatecrack;
1901 dbdatlen : TMsSQLdbdatlen;
1902 dbdead : TMsSQLdbdead;
1903 dbWinexit : TMsSQLdbWinexit;
1904 dbenlisttrans : TMsSQLdbenlisttrans;
1905 dbenlistxatrans : TMsSQLdbenlistxatrans;
1906 dbfreelogin : TMsSQLdbfreelogin;
1907 dbgetmaxprocs : TMsSQLdbgetmaxprocs;
1908 dbgetpacket : TMsSQLdbgetpacket;
1909 dbgetuserdata : TMsSQLdbgetuserdata;
1910 dbhasretstat : TMsSQLdbhasretstat;
1911 dbinit : TMsSQLdbinit;
1912 dbisavail : TMsSQLdbisavail;
1913 dbisopt : TMsSQLdbisopt;
1914 dbprocinfo : TMsSQLdbprocinfo;
1915 dbrpcexec : TMsSQLdbrpcexec;
1916 dbserverenum : TMsSQLdbserverenum;
1917 dbsetmaxprocs : TMsSQLdbsetmaxprocs;
1918 dbsetlpacket : TMsSQLdbsetlpacket;
1919 dbsetopt : TMsSQLdbsetopt;
1920 dbtabbrowse : TMsSQLdbtabbrowse;
1921 dbvarylen : TMsSQLdbvarylen;
1922 dbwillconvert : TMsSQLdbwillconvert;
1923 dbupdatetext : TMsSQLdbupdatetext;
1927 db12hour : TSybdb12hour;
1929 dberrhandle : TSybdberrhandle;
1930 dbmsghandle : TSybdbmsghandle;
1932 { Two-phase commit functions }
1933 abort_xact : TSybabort_xact;
1934 build_xact_string : TSybbuild_xact_string;
1935 close_commit : TSybclose_commit;
1936 commit_xact : TSybcommit_xact;
1937 open_commit : TSybopen_commit;
1938 remove_xact : TSybremove_xact;
1939 scan_xact : TSybscan_xact;
1940 start_xact : TSybstart_xact;
1941 stat_xact : TSybstat_xact;
1944 bcp_batch : TSybbcp_batch;
1945 bcp_bind : TSybbcp_bind;
1946 bcp_colfmt : TSybbcp_colfmt;
1947 bcp_collen : TSybbcp_collen;
1948 bcp_colptr : TSybbcp_colptr;
1949 bcp_columns : TSybbcp_columns;
1950 bcp_control : TSybbcp_control;
1951 bcp_done : TSybbcp_done;
1952 bcp_exec : TSybbcp_exec;
1953 bcp_init : TSybbcp_init;
1954 bcp_moretext : TSybbcp_moretext;
1955 bcp_readfmt : TSybbcp_readfmt;
1956 bcp_sendrow : TSybbcp_sendrow;
1957 bcp_writefmt : TSybbcp_writefmt;
1959 { Standard DB-Library functions }
1960 dbadata : TSybdbadata;
1961 dbadlen : TSybdbadlen;
1962 dbaltbind : TSybdbaltbind;
1963 dbaltcolid : TSybdbaltcolid;
1964 dbaltlen : TSybdbaltlen;
1965 dbaltop : TSybdbaltop;
1966 dbalttype : TSybdbalttype;
1967 dbaltutype : TSybdbaltutype;
1968 dbanullbind : TSybdbanullbind;
1969 dbbind : TSybdbbind;
1970 dbbylist : TSybdbbylist;
1971 dbcancel : TSybdbcancel;
1972 dbcanquery : TSybdbcanquery;
1973 dbchange : TSybdbchange;
1974 dbclose : TSybdbclose;
1975 dbclrbuf : TSybdbclrbuf;
1976 dbclropt : TSybdbclropt;
1978 dbcmdrow : TSybdbcmdrow;
1979 dbcolbrowse : TSybdbcolbrowse;
1980 dbcollen : TSybdbcollen;
1981 dbcolname : TSybdbcolname;
1982 dbcolsource : TSybdbcolsource;
1983 // dbcoltypeinfo : TSybdbcoltypeinfo;
1984 dbcoltype : TSybdbcoltype;
1985 dbcolutype : TSybdbcolutype;
1986 dbconvert : TSybdbconvert;
1987 dbcount : TSybdbcount;
1988 dbcurcmd : TSybdbcurcmd;
1989 dbcurrow : TSybdbcurrow;
1991 dbcursor : TSybdbcursor;
1992 dbcursorbind : TSybdbcursorbind;
1993 dbcursorclose : TSybdbcursorclose;
1994 dbcursorcolinfo : TSybdbcursorcolinfo;
1995 dbcursorfetch : TSybdbcursorfetch;
1996 dbcursorinfo : TSybdbcursorinfo;
1997 dbcursoropen : TSybdbcursoropen;
1998 dbdata : TSybdbdata;
1999 dbdatecrack : TSybdbdatecrack;
2000 dbdatlen : TSybdbdatlen;
2001 dbdead : TSybdbdead;
2002 dbexit : TSybdbexit;
2003 dbfcmd : TSybdbfcmd;
2004 dbfirstrow : TSybdbfirstrow;
2005 dbfreebuf : TSybdbfreebuf;
2006 dbloginfree : TSybdbloginfree;
2007 dbfreequal : TSybdbfreequal;
2008 dbgetchar : TSybdbgetchar;
2009 dbgetmaxprocs : TSybdbgetmaxprocs;
2010 dbgetoff : TSybdbgetoff;
2011 dbgetpacket : TSybdbgetpacket;
2012 dbgetrow : TSybdbgetrow;
2013 dbgetuserdata : TSybdbgetuserdata;
2014 dbhasretstat : TSybdbhasretstat;
2015 dbinit : TSybdbinit;
2016 dbisavail : TSybdbisavail;
2017 dbisopt : TSybdbisopt;
2018 dblastrow : TSybdblastrow;
2019 dblogin : TSybdblogin;
2020 dbmorecmds : TSybdbmorecmds;
2021 dbmoretext : TSybdbmoretext;
2022 dbname : TSybdbname;
2023 dbnextrow : TSybdbnextrow;
2024 dbnullbind : TSybdbnullbind;
2025 dbnumalts : TSybdbnumalts;
2026 dbnumcols : TSybdbnumcols;
2027 dbnumcompute : TSybdbnumcompute;
2028 dbnumorders : TSybdbnumorders;
2029 dbnumrets : TSybdbnumrets;
2030 dbopen : TSybdbopen;
2031 dbordercol : TSybdbordercol;
2032 dbprhead : TSybdbprhead;
2033 dbprrow : TSybdbprrow;
2034 dbprtype : TSybdbprtype;
2035 dbqual : TSybdbqual;
2036 dbreadtext : TSybdbreadtext;
2037 dbresults : TSybdbresults;
2038 dbretdata : TSybdbretdata;
2039 dbretlen : TSybdbretlen;
2040 dbretname : TSybdbretname;
2041 dbretstatus : TSybdbretstatus;
2042 dbrettype : TSybdbrettype;
2043 dbrows : TSybdbrows;
2044 dbrowtype : TSybdbrowtype;
2045 dbrpcinit : TSybdbrpcinit;
2046 dbrpcparam : TSybdbrpcparam;
2047 dbrpcsend : TSybdbrpcsend;
2049 dbrpwclr : TSybdbrpwclr;
2050 dbsetavail : TSybdbsetavail;
2051 dbsetmaxprocs : TSybdbsetmaxprocs;
2052 dbsetlname : TSybdbsetlname;
2053 dbsetlogintime : TSybdbsetlogintime;
2055 dbsetnull : TSybdbsetnull;
2056 dbsetopt : TSybdbsetopt;
2057 dbsettime : TSybdbsettime;
2058 dbsetuserdata : TSybdbsetuserdata;
2059 dbsqlexec : TSybdbsqlexec;
2060 dbsqlok : TSybdbsqlok;
2061 dbsqlsend : TSybdbsqlsend;
2062 dbstrcpy : TSybdbstrcpy;
2063 dbstrlen : TSybdbstrlen;
2064 dbtabbrowse : TSybdbtabbrowse;
2065 dbtabcount : TSybdbtabcount;
2066 dbtabname : TSybdbtabname;
2067 dbtabsource : TSybdbtabsource;
2068 dbtsnewlen : TSybdbtsnewlen;
2069 dbtsnewval : TSybdbtsnewval;
2070 dbtsput : TSybdbtsput;
2071 dbtxptr : TSybdbtxptr;
2072 dbtxtimestamp : TSybdbtxtimestamp;
2073 dbtxtsnewval : TSybdbtxtsnewval;
2074 dbtxtsput : TSybdbtxtsput;
2076 dbvarylen : TSybdbvarylen;
2077 dbwillconvert : TSybdbwillconvert;
2078 dbwritetext : TSybdbwritetext;