home *** CD-ROM | disk | FTP | other *** search
/ PC Format Collection 48 / SENT14D.ISO / tech / delphi / disk15 / inttab.pak / DBITYPES.INT < prev    next >
Encoding:
Text File  |  1995-08-24  |  87.8 KB  |  2,036 lines

  1.  
  2. {*******************************************************}
  3. {                                                       }
  4. {       Delphi Visual Component Library                 }
  5. {       BDE Data types                                  }
  6. {                                                       }
  7. {       Copyright (c) 1995 Borland International        }
  8. {                                                       }
  9. {*******************************************************}
  10.  
  11. unit DbiTypes;
  12.  
  13.   {$Z+}  { Word Sized Enums }
  14.  
  15. interface
  16.  
  17. uses
  18.   Wintypes;
  19.  
  20. { sdk debug layer defines }
  21.  
  22. const
  23.   DEBUGON            = $1;
  24.   OUTPUTTOFILE       = $2;
  25.   FLUSHEVERYOP       = $8;
  26.   APPENDTOLOG        = $10;
  27.  
  28. { Constants }
  29.  
  30.   DBIMAXNAMELEN      = 31;           { Name limit (table, field etc) }
  31.   DBIMAXTBLNAMELEN   = 127;          { Max table name length }
  32.   DBIMAXSPNAMELEN    = 64;           { Max stored procedure name length }
  33.   DBIMAXFLDSINKEY    = 16;           { Max fields in a key }
  34.   DBIMAXKEYEXPLEN    = 220;          { Max Key expression length }
  35.   DBIMAXPATHLEN      = 81;           { Max path+file name len (allocate 82) }
  36.   DBIMAXEXTLEN       = 3;            { Max file extension len, not incl. dot }
  37.   DBIMAXDRIVELEN     = 2;            { Max drive length }
  38.   DBIMAXMSGLEN       = 127;          { Max message len (allocate 128) }
  39.   DBIMAXVCHKLEN      = 255;          { Max val check len }
  40.   DBIMAXPICTLEN      = 175;          { Max picture len   //Verify this - VJ }
  41.   DBIMAXFLDSINSEC    = 256;          { Max fields in security spec }
  42.  
  43.   DBIMAXSCFIELDS     = 16;           { max nbr of fields in a config section }
  44.   DBIMAXSCFLDLEN     = 128;          { max field length }
  45.   DBIMAXSCRECSIZE    = 2048;         { max rec size }
  46.  
  47.   DBIMAXUSERNAMELEN  = 14;           { Max user name (general) }
  48.   DBIMAXXBUSERNAMELEN = 12;          { Max user name length (xBASE) }
  49.   DBIMAXBOOKMARKLEN  = 4104;         { Max Bookmark length }
  50.  
  51. {============================================================================}
  52. {                             G e n e r a l                                  }
  53. {============================================================================}
  54.  
  55. type
  56.   DATE               = Longint;
  57.   TIME               = Longint;
  58.   TIMESTAMP          = Double;
  59.   DBIResult          = Word;         { Function result }
  60.   WordEnum           = Word;
  61.   PLocale            = Pointer;
  62.  
  63. { Handle Types }
  64.  
  65.   _hDBIObj           = record end;   { Dummy structure to create "typed" handles }
  66.   hDBIObj            = ^_hDBIObj;    { Generic object handle }
  67.   hDBIDb             = ^_hDBIObj;    { Database handle }
  68.   hDBIQry            = ^_hDBIObj;    { Query handle }
  69.   hDBIStmt           = ^_hDBIObj;    { Statement handle ("new query") }
  70.   hDBICur            = ^_hDBIObj;    { Cursor handle }
  71.   hDBISes            = ^_hDBIObj;    { Session handle }
  72.   hDBIXlt            = ^_hDBIObj;    { Translation handle }
  73.   hDBICfg            = ^_hDBIObj;    { Configuration handle }
  74.   hDBIXact           = ^_hDBIObj;    { Transaction handle }
  75.   hDBIFilter         = ^_hDBIObj;    { Filter handle }
  76.  
  77. { Handle Pointers }
  78.  
  79.   phDBIObj           = ^hDBIObj;     { Pointer to Generic object handle }
  80.   phDBIDb            = ^hDBIDb;      { Pointer to Database handle }
  81.   phDBIQry           = ^hDBIQry;     { Pointer to Query handle }
  82.   phDBIStmt          = ^hDBIStmt;    { Pointer to Statement handle }
  83.   phDBICur           = ^hDBICur;     { Pointer to Cursor handle }
  84.   phDBISes           = ^hDBISes;     { Pointer to Session handle }
  85.   phDBIXlt           = ^hDBIXlt;     { Pointer to Translation handle }
  86.   phDBICfg           = ^hDBICfg;     { Pointer to Configuration handle }
  87.   phDBIXact          = ^hDBIXact;    { Pointer to Transaction handle }
  88.   phDBIFilter        = ^hDBIFilter;  { Pointer to Filter handle }
  89.  
  90. { typedefs for buffers of various common sizes: }
  91.  
  92.   DBIPATH            = array [0..DBIMAXPATHLEN] of Char; { holds a DOS path }
  93.   DBINAME            = array [0..DBIMAXNAMELEN] of Char; { holds a name }
  94.   DBIEXT             = array [0..DBIMAXEXTLEN] of Char; { holds an extension EXT }
  95.   DBIDOTEXT          = array [0..DBIMAXEXTLEN+1] of Char; { holds an extension EXT including '.' }
  96.   DBIDRIVE           = array [0..DBIMAXDRIVELEN] of Char; { holds a drive name }
  97.   DBITBLNAME         = array [0..DBIMAXTBLNAMELEN] of Char; { holds a table name }
  98.   DBISPNAME          = array [0..DBIMAXSPNAMELEN] of Char; { holds a stored procedure name }
  99.   DBIUSERNAME        = array [0..DBIMAXUSERNAMELEN] of Char; { holds a user name }
  100.   DBIKEY             = array [0..DBIMAXFLDSINKEY-1] of Word; { holds list of fields in a key }
  101.   DBIKEYEXP          = array [0..DBIMAXKEYEXPLEN] of Char; { holds a key expression }
  102.   DBIVCHK            = array [0..DBIMAXVCHKLEN] of Byte; { holds a validity check }
  103.   DBIPICT            = array [0..DBIMAXPICTLEN] of Char; { holds a picture (Pdox) }
  104.   DBIMSG             = array [0..DBIMAXMSGLEN] of Char; { holds an error message }
  105.  
  106.  
  107. {============================================================================}
  108. {                             Environmental                                  }
  109. {============================================================================}
  110.  
  111. type
  112.   pDBIEnv = ^DBIEnv;
  113.   DBIEnv = record                    { Struct for defining the environ. }
  114.     szWorkDir       : DBIPATH;       { Working directory }
  115.     szIniFile       : DBIPATH;       { Configuration file }
  116.     bForceLocalInit : Bool;          { Force local initialization }
  117.     szLang          : DBINAME;       { System language driver }
  118.     szClientName    : DBINAME;       { Client name }
  119.   end;
  120.  
  121. {============================================================================}
  122. {                   System Info                                              }
  123. {============================================================================}
  124.  
  125. type
  126.   pSYSVersion = ^SYSVersion;
  127.   SYSVersion = record                { System Version Info }
  128.     iVersion        : Word;          { Engine version }
  129.     iIntfLevel      : Word;          { Client Interface level }
  130.     dateVer         : Date;          { Version date (Compile/Release) }
  131.     timeVer         : Time;          { Version time (Compile/Release) }
  132.   end;
  133.  
  134.   pSYSConfig = ^SYSConfig;
  135.   SYSConfig = record                 { System configuration (basic) }
  136.     bLocalShare     : Bool;          { If Local files will be shared }
  137.     iNetProtocol    : Word;          { Net Protocol (35, 40 etc.) }
  138.     bNetShare       : Bool;          { True if connected to network }
  139.     szNetType       : DBINAME;       { Network type }
  140.     szUserName      : DBIUSERNAME;   { Network user name }
  141.     szIniFile       : DBIPATH;       { Configuration file }
  142.     szLangDriver    : DBINAME;       { System language driver }
  143.   end;
  144.  
  145.   pSYSInfo = ^SYSInfo;
  146.   SYSInfo = record                   { System Status/Info }
  147.     iBufferSpace    : Word;          { in K }
  148.     iHeapSpace      : Word;          { in K }
  149.     iDrivers        : Word;          { Active/Loaded drivers }
  150.     iClients        : Word;          { Active clients }
  151.     iSessions       : Word;          { Number of sessions (For all clients) }
  152.     iDatabases      : Word;          { Open databases }
  153.     iCursors        : Word;          { Number of cursors }
  154.   end;
  155.  
  156.   pCLIENTInfo = ^CLIENTInfo;
  157.   CLIENTInfo = record
  158.     szName          : DBINAME;       { Documentary name }
  159.     iSessions       : Word;          { Number of sessions }
  160.     szWorkDir       : DBIPATH;       { Working directory }
  161.     szLang          : DBINAME;       { System language driver (Client supplied) }
  162.   end;
  163.  
  164.   pSESInfo = ^SESInfo;
  165.   SESInfo = record
  166.     iSession        : Word;          { Session id (1..n) }
  167.     szName          : DBINAME;       { Documentary name }
  168.     iDatabases      : Word;          { Open databases }
  169.     iCursors        : Word;          { Open cursors }
  170.     iLockWait       : Integer;       { Lock wait time (in seconds) }
  171.     szNetDir        : DBIPATH;       { Net directory location }
  172.     szPrivDir       : DBIPATH;       { Current Private directory }
  173.   end;
  174.  
  175. {============================================================================}
  176. {                             Table / Field Types                            }
  177. {============================================================================}
  178.  
  179. { Driver Types }
  180.  
  181. const
  182.   szPARADOX          = 'PARADOX';
  183.   szDBASE            = 'DBASE';
  184.   szASCII            = 'ASCIIDRV';
  185.  
  186.  
  187. { Field Types (Logical) }
  188.  
  189.   fldUNKNOWN         = 0;
  190.   fldZSTRING         = 1;            { Null terminated string }
  191.   fldDATE            = 2;            { Date     (32 bit) }
  192.   fldBLOB            = 3;            { Blob }
  193.   fldBOOL            = 4;            { Boolean  (16 bit) }
  194.   fldINT16           = 5;            { 16 bit signed number }
  195.   fldINT32           = 6;            { 32 bit signed number }
  196.   fldFLOAT           = 7;            { 64 bit floating point }
  197.   fldBCD             = 8;            { BCD }
  198.   fldBYTES           = 9;            { Fixed number of bytes }
  199.   fldTIME            = 10;           { Time        (32 bit) }
  200.   fldTIMESTAMP       = 11;           { Time-stamp  (64 bit) }
  201.   fldUINT16          = 12;           { Unsigned 16 bit integer }
  202.   fldUINT32          = 13;           { Unsigned 32 bit integer }
  203.   fldFLOATIEEE       = 14;           { 80-bit IEEE float }
  204.   fldVARBYTES        = 15;           { Length prefixed var bytes }
  205.   fldLOCKINFO        = 16;           { Look for LOCKINFO typedef }
  206.  
  207.   MAXLOGFLDTYPES     = 17;           { Number of logical fieldtypes }
  208.  
  209. { Sub Types }
  210.  
  211. { fldFLOAT subtype }
  212.  
  213.   fldstMONEY         = 21;           { Money }
  214.  
  215. { fldBLOB subtypes }
  216.  
  217.   fldstMEMO          = 22;           { Text Memo }
  218.   fldstBINARY        = 23;           { Binary data }
  219.   fldstFMTMEMO       = 24;           { Formatted Text }
  220.   fldstOLEOBJ        = 25;           { OLE object (Paradox) }
  221.   fldstGRAPHIC       = 26;           { Graphics object }
  222.   fldstDBSOLEOBJ     = 27;           { dBASE OLE object }
  223.   fldstTYPEDBINARY   = 28;           { Typed Binary data }
  224.  
  225. { fldZSTRING subtype }
  226.  
  227.   fldstPASSWORD      = 1;            { Password }
  228.  
  229. { fldINT32 subtype }
  230.  
  231.   fldstAUTOINC       = 29;
  232.  
  233. { Paradox types (Physical) }
  234.  
  235.   fldPDXCHAR         = $101;         { Alpha    (string) }
  236.   fldPDXNUM          = $102;         { Numeric     }
  237.   fldPDXMONEY        = $103;         { Money }
  238.   fldPDXDATE         = $104;         { Date }
  239.   fldPDXSHORT        = $105;         { Short }
  240.   fldPDXMEMO         = $106;         { Text Memo       (blob) }
  241.   fldPDXBINARYBLOB   = $107;         { Binary data     (blob) }
  242.   fldPDXFMTMEMO      = $108;         { Formatted text  (blob) }
  243.   fldPDXOLEBLOB      = $109;         { OLE object      (blob) }
  244.   fldPDXGRAPHIC      = $10A;         { Graphics object (blob) }
  245.   fldPDXBLOB         = fldPDXMEMO;
  246.   fldPDXLONG         = $10B;         { Long }
  247.   fldPDXTIME         = $10C;         { Time }
  248.   fldPDXDATETIME     = $10D;         { Time Stamp }
  249.   fldPDXBOOL         = $10E;         { Logical }
  250.   fldPDXAUTOINC      = $10F;         { Auto increment (long) }
  251.   fldPDXBYTES        = $110;         { Fixed number of bytes }
  252.   fldPDXBCD          = $111;         { BCD (32 digits) }
  253.   fldPDXUNICHAR      = $112;         { not supported yet }
  254.  
  255. { xBASE types (Physical) }
  256.  
  257.   fldDBCHAR          = $201;         { Char string }
  258.   fldDBNUM           = $202;         { Number }
  259.   fldDBMEMO          = $203;         { Memo          (blob) }
  260.   fldDBBOOL          = $204;         { Logical }
  261.   fldDBDATE          = $205;         { Date }
  262.   fldDBFLOAT         = $206;         { Float }
  263.   fldDBLOCK          = $207;         { Logical type is LOCKINFO }
  264.   fldDBOLEBLOB       = $208;         { OLE object    (blob) }
  265.   fldDBBINARY        = $209;         { Binary data   (blob) }
  266.   fldDBBYTES         = $20A;         { Only for TEMPORARY tables }
  267.  
  268. { xBASE key types (Cannot be used as field types) }
  269.  
  270.   fldDBKEYNUM        = $210;
  271.   fldDBKEYBCD        = $211;
  272.  
  273.  
  274. { Ascii types (Physical) }
  275.  
  276.   fldASCCHAR         = $301;         { Char string }
  277.   fldASCNUM          = $302;         { Number }
  278.   fldASCBOOL         = $303;         { Logical }
  279.   fldASCDATE         = $304;         { Date }
  280.   fldASCFLOAT        = $305;         { Float }
  281.   fldASCLOCK         = $306;         { Not used }
  282.   fldASCTIMESTAMP    = $307;         { TimeStamp }
  283.   fldASCTIME         = $308;         { Time }
  284.   fldASCLONG         = $309;         { Long }
  285.   fldASCMONEY        = $30A;         { Money }
  286.  
  287.  
  288. {============================================================================}
  289. {                    Field descriptor                                        }
  290. {============================================================================}
  291.  
  292.  
  293. type
  294.   FLDVchk = (                        { Field Val Check type }
  295.     fldvNOCHECKS,                    { Does not have explicit val checks }
  296.     fldvHASCHECKS,                   { One or more val checks on the field }
  297.     fldvUNKNOWN                      { Dont know at this time }
  298.   );
  299.  
  300. type
  301.   FLDRights = (                      { Field Rights }
  302.     fldrREADWRITE,                   { Field can be Read/Written }
  303.     fldrREADONLY,                    { Field is Read only }
  304.     fldrNONE,                        { No Rights on this field }
  305.     fldrUNKNOWN                      { Dont know at this time }
  306.   );
  307.  
  308. type
  309.   pFLDDesc = ^FLDDesc;
  310.   FLDDesc = record                   { Field Descriptor }
  311.     iFldNum         : Word;          { Field number (1..n) }
  312.     szName          : DBINAME;       { Field name }
  313.     iFldType        : Word;          { Field type }
  314.     iSubType        : Word;          { Field subtype (if applicable) }
  315.     iUnits1         : Integer;       { Number of Chars, digits etc }
  316.     iUnits2         : Integer;       { Decimal places etc. }
  317.     iOffset         : Word;          { Offset in the record (computed) }
  318.     iLen            : Word;          { Length in bytes (computed) }
  319.     iNullOffset     : Word;          { For Null bits (computed) }
  320.     efldvVchk       : FLDVchk;       { Field Has vcheck (computed) }
  321.     efldrRights     : FLDRights;     { Field Rights (computed) }
  322.   end;
  323.  
  324. {============================================================================}
  325. {                    Index descriptor                                        }
  326. {============================================================================}
  327.  
  328. type
  329.   pIDXDesc = ^IDXDesc;
  330.   IDXDesc = record                   { Index description }
  331.     szName          : DBITBLNAME;    { Index name }
  332.     iIndexId        : Word;          { Index number }
  333.     szTagName       : DBINAME;       { Tag name (for dBASE) }
  334.     szFormat        : DBINAME;       { Optional format (BTREE, HASH etc) }
  335.     bPrimary        : Bool;          { True, if primary index }
  336.     bUnique         : Bool;          { True, if unique keys }
  337.     bDescending     : Bool;          { True, for descending index }
  338.     bMaintained     : Bool;          { True, if maintained index }
  339.     bSubset         : Bool;          { True, if subset index }
  340.     bExpIdx         : Bool;          { True, if expression index }
  341.     iCost           : Word;          { Not used }
  342.     iFldsInKey      : Word;          { Fields in the key (1 for Exp) }
  343.     iKeyLen         : Word;          { Phy Key length in bytes (Key only) }
  344.     bOutofDate      : Bool;          { True, if index out of date }
  345.     iKeyExpType     : Word;          { Key type of Expression }
  346.     aiKeyFld        : DBIKEY;        { Array of field numbers in key }
  347.     szKeyExp        : DBIKEYEXP;     { Key expression }
  348.     szKeyCond       : DBIKEYEXP;     { Subset condition }
  349.     bCaseInsensitive : Bool;         { True, if case insensitive index }
  350.     iBlockSize      : Word;          { Block size in bytes }
  351.     iRestrNum       : Word;          { Restructure number }
  352.     iUnUsed         : array [0..15] of Word;
  353.   end;
  354.  
  355. {============================================================================}
  356. {             Validity check, Referential integrity descriptors              }
  357. {============================================================================}
  358.  
  359.  
  360.  
  361. { Subtypes for Lookup }
  362.  
  363.   LKUPType = (                       { Paradox Lookup type }
  364.     lkupNONE,                        { Has no lookup }
  365.     lkupPRIVATE,                     { Just Current Field + Private }
  366.     lkupALLCORRESP,                  { All Corresponding + No Help }
  367.     lkupHELP,                        { Just Current Fld + Help and Fill }
  368.     lkupALLCORRESPHELP               { All Corresponging + Help }
  369.   );
  370.  
  371.   RINTType = (                       { Ref integrity type }
  372.     rintMASTER,                      { This table is Master }
  373.     rintDEPENDENT                    { This table is Dependent }
  374.   );
  375.  
  376.   RINTQual = (                       { Ref integrity action/qualifier }
  377.     rintRESTRICT,                    { Prohibit operation }
  378.     rintCASCADE                      { Cascade operation }
  379.   );
  380.  
  381. const
  382.   TODAYVAL              = 2;         { for Min/Max/Def val flags }
  383.  
  384.    { In VCHKDesc below, if any of bHasMinVal/bHasMaxVal/bHasDefVal }
  385.    { = TODAYVAL, then TODAY is assumed.                            }
  386.  
  387. type
  388.   pVCHKDesc = ^VCHKDesc;
  389.   VCHKDesc = record                  { Val Check structure }
  390.     iFldNum         : Word;          { Field number }
  391.     bRequired       : Bool;          { If True, value is required }
  392.     bHasMinVal      : Bool;          { If True, has min value }
  393.     bHasMaxVal      : Bool;          { If True, has max value }
  394.     bHasDefVal      : Bool;          { If True, has default value }
  395.     aMinVal         : DBIVCHK;       { Min Value }
  396.     aMaxVal         : DBIVCHK;       { Max Value }
  397.     aDefVal         : DBIVCHK;       { Default value }
  398.     szPict          : DBIPICT;       { Picture string }
  399.     elkupType       : LKUPType;      { Lookup/Fill type }
  400.     szLkupTblName   : DBIPATH;       { Lookup Table name }
  401.   end;
  402.  
  403.   pRINTDesc = ^RINTDesc;
  404.   RINTDesc = record                  { Ref Integrity Desc }
  405.     iRintNum        : Word;          { Ref integrity number }
  406.     szRintName      : DBINAME;       { A name to tag this integegrity constraint }
  407.     eType           : RINTType;      { Whether master/dependent }
  408.     szTblName       : DBIPATH;       { Other table name }
  409.     eModOp          : RINTQual;      { Modify qualifier }
  410.     eDelOp          : RINTQual;      { Delete qualifier }
  411.     iFldCount       : Word;          { Fields in foreign key }
  412.     aiThisTabFld    : DBIKEY;        { Fields in this table }
  413.     aiOthTabFld     : DBIKEY;        { Fields in other table }
  414.   end;
  415.  
  416.  
  417. {============================================================================}
  418. {                    Security descriptor                                     }
  419. {============================================================================}
  420. { Family rights }
  421.  
  422. const
  423.   NOFAMRIGHTS        = $00;          { No Family rights }
  424.   FORMRIGHTS         = $01;          { Can change form }
  425.   RPTRIGHTS          = $02;          { Can change reports }
  426.   VALRIGHTS          = $04;          { Can change valchecks }
  427.   SETRIGHTS          = $08;          { Can change settings }
  428.   ALLFAMRIGHTS       = (FORMRIGHTS or RPTRIGHTS or VALRIGHTS or SETRIGHTS);
  429.                                              { All family rights }
  430.  
  431. type
  432.   PRVType = WordEnum;
  433. const
  434.     prvNONE      = 0;                { No privilege }
  435.     prvREADONLY  = 1;                { Read only Table or Field }
  436.     prvMODIFY    = 3;                { Read and Modify fields (non-key) }
  437.     prvINSERT    = 7;                { Insert + All of above }
  438.     prvINSDEL    = $0F;              { Delete + All of above }
  439.     prvFULL      = $1F;              { Full Writes }
  440.     prvUNKNOWN   = $FF;              { Unknown }
  441.  
  442.  
  443. type
  444.   pSECDesc = ^SECDesc;
  445.   SECDesc = record                   { Security description }
  446.     iSecNum         : Word;          { Nbr to identify desc }
  447.     eprvTable       : Word;          { Table privileges }
  448.     iFamRights      : Word;          { Family rights }
  449.     szPassword      : DBINAME;       { Null terminated string }
  450.     aprvFld         : array [0..DBIMAXFLDSINSEC-1] of Word;
  451.                      { Field level privileges (prvNONE/prvREADONLY/prvFULL) }
  452.   end;
  453.  
  454. {============================================================================}
  455. {                         Miscellaneous                                      }
  456. {============================================================================}
  457.  
  458. { Index Id used to open table without a default index (i.e. no order) }
  459.  
  460. const
  461.   NODEFAULTINDEX     = $FFFF;
  462.  
  463.  
  464. {============================================================================}
  465. {                    Object types                                            }
  466. {============================================================================}
  467.  
  468. type
  469.   DBIOBJType = (
  470.     objFILLER,                       { Filler to make next start at 1 }
  471.     objSYSTEM,                       { System object }
  472.     objSESSION,                      { Session object }
  473.     objDRIVER,                       { Driver object }
  474.     objDATABASE,                     { Database object }
  475.     objCURSOR,                       { Cursor object }
  476.     objSTATEMENT,                    { Statement object }
  477.     objCLIENT,                       { Client object }
  478.     objDBSEC                         { DbSystem object (dBASE only) }
  479.   );
  480.  
  481. {============================================================================}
  482. {                    Cursor properties                                       }
  483. {============================================================================}
  484.  
  485. type
  486.   DBIShareMode = (                   { Database/Table Share type }
  487.     dbiOPENSHARED,                   { Open shared  (Default) }
  488.     dbiOPENEXCL                      { Open exclusive }
  489.   );
  490.  
  491.   DBIOpenMode = (                    { Database/Table Access type }
  492.     dbiREADWRITE,                    { Read + Write   (Default) }
  493.     dbiREADONLY                      { Read only }
  494.   );
  495.  
  496.   DBILockType = (                    { Lock types (Table level) }
  497.     dbiNOLOCK,                       { No lock   (Default) }
  498.     dbiWRITELOCK,                    { Write lock }
  499.     dbiREADLOCK                      { Read lock }
  500.   );
  501.  
  502.   XLTMode = (                        { Field translate mode }
  503.     xltNONE,                         { No translation  (Physical Types) }
  504.     xltRECORD,                       { Record level translation (not supported) }
  505.     xltFIELD                         { Field level translation (Logical types) }
  506.   );
  507.  
  508.   UPDLockMode = (                    { Update lock mode (SQL only) }
  509.     updWHEREALL,                     { All fields in WHERE clause }
  510.     updWHEREKEYCHG,                  { Key and changed fields in WHERE clause }
  511.     updWHEREKEY                      { Key fields in WHERE clause }
  512.   );
  513.  
  514.  
  515. { Table Levels }
  516.  
  517. const
  518.   TBLLEVEL3          = 3;            { Paradox level 3 and dBASE level 3+ }
  519.   TBLLEVEL4          = 4;            { Paradox level 4 and dBASE level 4 }
  520.   TBLLEVEL5          = 5;            { Paradox level 5 and dBASE/Win }
  521.   FOXLEVEL25         = 25;           { Fox Table (Ver 2.5) }
  522.  
  523.  
  524.  
  525. type
  526.   pCURProps = ^CURProps;
  527.   CURProps = record                  { Virtual Table properties }
  528.     szName          : DBITBLNAME;    { table name (no extension, if it can be derived) }
  529.     iFNameSize      : Word;          { Full file name size }
  530.     szTableType     : DBINAME;       { Driver type }
  531.     iFields         : Word;          { No of fields in Table }
  532.     iRecSize        : Word;          { Record size (logical record) }
  533.     iRecBufSize     : Word;          { Record size (physical record) }
  534.     iKeySize        : Word;          { Key size }
  535.     iIndexes        : Word;          { Number of indexes }
  536.     iValChecks      : Word;          { Number of val checks }
  537.     iRefIntChecks   : Word;          { Number of Ref Integrity constraints }
  538.     iBookMarkSize   : Word;          { Bookmark size }
  539.     bBookMarkStable : Bool;          { Stable book marks }
  540.     eOpenMode       : DBIOpenMode;   { ReadOnly / RW }
  541.     eShareMode      : DBIShareMode;  { Excl / Share }
  542.     bIndexed        : Bool;          { Index is in use }
  543.     iSeqNums        : Integer;       { 1: Has Seqnums; 0: Has Record# }
  544.     bSoftDeletes    : Bool;          { Supports soft deletes }
  545.     bDeletedOn      : Bool;          { If above, deleted recs seen }
  546.     iRefRange       : Word;          { Not used }
  547.     exltMode        : XLTMode;       { Translate Mode }
  548.     iRestrVersion   : Word;          { Restructure version number }
  549.     bUniDirectional : Bool;          { Cursor is uni-directional }
  550.     eprvRights      : Word;          { Table  rights }
  551.     iFmlRights      : Word;          { Family rights      }
  552.     iPasswords      : Word;          { Number of Aux passwords }
  553.     iCodePage       : Word;          { Codepage (0 if unknown) }
  554.     bProtected      : Bool;          { Table is protected by password }
  555.     iTblLevel       : Word;          { Driver dependent table level }
  556.     szLangDriver    : DBINAME;       { Language driver name }
  557.     bFieldMap       : Bool;          { Field map active }
  558.     iBlockSize      : Word;          { Physical file blocksize in K }
  559.     bStrictRefInt   : Bool;          { Strict referential integrity }
  560.     iFilters        : Word;          { Number of filters }
  561.     bTempTable      : Bool;          { Table is a temporary table }
  562.     iUnUsed         : array [0..15] of Word;
  563.   end;
  564.  
  565. {============================================================================}
  566. {                   Record Properties                                        }
  567. {============================================================================}
  568.  
  569. type
  570.   pRECProps = ^RECProps;
  571.   RECProps = record                  { Record properties }
  572.     iSeqNum         : Longint;       { When Seq# supported only }
  573.     iPhyRecNum      : Longint;       { When Phy Rec#s supported only }
  574.     bRecChanged     : Bool;          { Not used }
  575.     bSeqNumChanged  : Bool;          { Not used }
  576.     bDeleteFlag     : Bool;          { When soft delete supported only }
  577.   end;
  578.  
  579.  
  580. {============================================================================}
  581. {                   General properties  DbiGetProp/DbiSetProp                }
  582. {============================================================================}
  583.  
  584.  
  585. { Cursor properties }
  586. { General           }
  587. const
  588.   curMAXPROPS        = $00050000;    { ro UINT16   , Number of defined properties }
  589.   curTABLENAME       = $00050001;    { ro pTBLNAME , Table name }
  590.   curTABLETYPE       = $00050002;    { ro pDBINAME , Table type }
  591.   curTABLELEVEL      = $00050003;    { ro UINT16   , Table level 1..n }
  592.   curFILENAME        = $00050004;    { ro pPATH    , Full filename }
  593.   curXLTMODE         = $00050005;    { rw XLTMode  , Translate mode }
  594.   curSEQREADON       = $00050006;    { rw BOOL     , Sequential read mode hint ON }
  595.   curONEPASSON       = $00050007;    { rw BOOL     , One pass mode hint ON }
  596.   curUPDATETS        = $00050008;    { ro TIMESTAMP, Update timestamp }
  597.   curSOFTDELETEON    = $00050009;    { rw BOOL     , Softdelete ON }
  598.   curLANGDRVNAME     = $0005000A;    { ro pCHAR    , Symbolic language drv. name }
  599.   curCURSORNAME      = $0005000B;    { ro pCHAR    , name of the cursor }
  600.   maxcurPROPS        = 11;           { keep in sync when adding cursor properties }
  601.  
  602. { Paradox specific }
  603.   curPDXMAXPROPS     = $01050000;    { ro UINT16   , Number of defined properties }
  604.   maxcurPDXPROPS     = 0;
  605.  
  606. { DBase specific }
  607.   curDBMAXPROPS      = $02050000;    { ro UINT16   , Number of defined properties }
  608.   curINEXACTON       = $02050001;    { rw BOOL     , InExact match ON }
  609.   curSHAREMODE       = $02050002;    { rw DBIShareMode, Share mode }
  610.   maxcurDBPROPS      = 2;
  611.  
  612. { Text Driver specific }
  613.   curDELIMITALLFLDS  = $03050000;    { rw BOOL , Delimit all fields. }
  614.   curUSESCHEMAFILE   = $03050001;    { rw BOOL , read schema from a file }
  615.  
  616. { SQL Driver specific }
  617.   curUPDLOCKMODE     = $04050000;    { rw UPDLockMode ,Update lock mode }
  618.   curNATIVEHNDL      = $04050001;    { ro pBYTE       ,Native cursor handle }
  619.  
  620. { Driver properties }
  621. { General           }
  622.   drvMAXPROPS        = $00030000;    { ro UINT16   , Number of defined properties }
  623.   drvDRIVERTYPE      = $00030002;    { ro pDBINAME , Driver type }
  624.   drvDRIVERVERSION   = $00030003;    { ro UINT16   , Driver version }
  625.   maxdrvPROPS        = 2;            { keep in sync when adding driver properties }
  626.  
  627. { Database properties }
  628. { General             }
  629.   dbMAXPROPS         = $00040000;    { ro UINT16   , Number of defined properties }
  630.   dbDATABASENAME     = $00040001;    { ro pDBINAME , Database name/alias }
  631.   dbDATABASETYPE     = $00040002;    { ro pDBINAME , Database type }
  632.   dbDEFAULTDRIVER    = $00040003;    { rw pDBINAME , Default Driver name }
  633.   dbPARAMFMTQMARK    = $00040004;    { rw BOOL     , Stmt param marker fmt = ? }
  634.   dbUSESCHEMAFILE    = $00040005;    { rw BOOL , for text driver only. }
  635.   maxdbPROPS         = 10;           { keep in sync when adding ANY db properties }
  636.  
  637. { SQL Driver specific }
  638.   dbASYNCSUPPORT     = $04040000;    { ro BOOL     , Async. qry exec support }
  639.   dbPROCEDURES       = $04040001;    { ro BOOL     , Stored procedure support }
  640.   dbDEFAULTTXNISO    = $04040002;    { ro eXILType , Default transaction iso level }
  641.   dbNATIVEHNDL       = $04040003;    { ro pBYTE    , Native connection handle }
  642.   dbNATIVEPASSTHRUHNDL = $04040004;  { ro pBYTE    , Native passthru connection handle }
  643.  
  644. { Session properties }
  645. { General            }
  646.   sesMAXPROPS        = $00020000;    { ro UINT16   , Number of defined properties }
  647.   sesSESSIONNAME     = $00020001;    { ro pDBINAME , Name of seesion }
  648.   sesNETFILE         = $00020002;    { rw pCHAR        , Full filename of netfile (MAXPATHLEN) }
  649.   sesCFGMODE         = $00020003;    { rw CFGMode, Mode of configuration file. }
  650.   sesDEFAULTDRIVER   = $00020004;    { rw pDBINAME, default driver name }
  651.   sesGROUPNAME       = $00020005;    { rw pCHAR, Security - user group name (dBASE) }
  652.   sesUSERNAME        = $00020006;    { rw pCHAR, User Name }
  653.   sesUSERPASSWORD    = $00020007;    { rw pCHAR, User password }
  654.   sesSECFILENAME     = $00020008;    { rw pCHAR, Location of dBASE Security file }
  655.   maxsesPROPS        = 8;            { keep in sync when adding session properties }
  656.  
  657.  
  658. { System properties }
  659. { General           }
  660.   sysMAXPROPS        = $00010000;    { ro UINT16  , Number of defined properties }
  661.   sysLOWMEMUSAGE     = $00010001;    { ro UINT16  , Low memory usage in (k) }
  662.   maxsysPROPS        = 1;            { keep in sync when adding system properties }
  663.  
  664.  
  665. { Statement properties }
  666. { General              }
  667.   stmtMAXPROPS       = $00060001;    { ro UINT16      Number of defined properties }
  668.   stmtPARAMETERCOUNT = $00060002;    { ro UINT16      Count of parameters }
  669.   stmtPARAMETERDESCS = $00060003;    { ro aFLDDesc    Array of parameters }
  670.   stmtLANGDRVNAME    = $00060004;    { ro pCHAR       Symbolic language drv. name }
  671.   stmtUNIDIRECTIONAL = $00060010;    { rw BOOL        Cursor Unidirectional }
  672.   stmtCURSORNAME     = $00060011;    { rw pCHAR       Cursor name }
  673.   stmtNEWCONNECT     = $00060012;    { rw BOOL        Stmt on new connection }
  674.   stmtNATIVEHNDL     = $00060013;    { ro pBYTE       Native statement handle }
  675.   maxstmtPROPS       = 18;           { keep in sync when adding ANY stmt properties }
  676.  
  677. { specific to QBE or local SQL }
  678.   stmtANSTYPE        = $00060020;    { rw pBYTE       Table Type of Answer set }
  679.   stmtLIVENESS       = $00060021;    { rw LIVENESS    Preference for canned/live answers }
  680.   stmtQRYMODE        = $00060022;    { rw QryEvalMode Execute on server or local or either }
  681.   stmtBLANKS         = $00060023;    { rw BOOL        True if blanks to be regarded as zeros. }
  682.   stmtDATEFORMAT     = $00060024;    { rw FMTDate     Date format }
  683.   stmtNUMBERFORMAT   = $00060025;    { rw FMTNumber   Number format }
  684.   stmtAUXTBLS        = $00060026;    { rw BOOL        True if QBE to create CHANGED, etc. }
  685.   stmtTBLVECTOR      = $00060027;    { ro UINT16      Vector of tables generated by query. }
  686.   stmtALLPROPS       = $00060028;    { rw QueryLowProps }
  687.   stmtALLPROPSSIZE   = $00060029;    { rw INT16       size of QueryLowProps }
  688.   stmtANSNAME        = $00060030;    { rw pBYTE       Answer Table Name. }
  689.  
  690.  
  691. {============================================================================}
  692. {                    Transactions                                            }
  693. {============================================================================}
  694.  
  695. { Transaction support }
  696.  
  697. type
  698.   eXILType = (                       { Transaction isolation levels }
  699.     xilDIRTYREAD,                    { Uncommitted changes read }
  700.     xilREADCOMMITTED,                { Committed changes, no phantoms }
  701.     xilREPEATABLEREAD                { Full read repeatability }
  702.   );
  703.  
  704.   eXEnd = (                          { Transaction end control }
  705.     xendCOMMIT,                      { Commit transaction }
  706.     xendCOMMITKEEP,                  { Commit transaction, keep cursors }
  707.     xendABORT                        { Rollback transaction }
  708.   );
  709.  
  710.   eXState = (                        { Transaction end control }
  711.     xsINACTIVE,                      { Transaction inactive }
  712.     xsACTIVE                         { Transaction active }
  713.   );
  714.  
  715. type
  716.   pXInfo = ^XInfo;
  717.   XInfo = record
  718.     exState         : eXState;       { xsActive, xsInactive }
  719.     eXIL            : eXILType;      { Xact isolation level }
  720.     uNests          : Word;          { Xact children }
  721.   end;
  722.  
  723.  
  724. {============================================================================}
  725. {                         BookMark compares                                  }
  726. {============================================================================}
  727.  
  728. type
  729.   PCMPBkMkRslt = ^CMPBkMkRslt;
  730.   CMPBkMkRslt = WordEnum;
  731. const
  732.     CMPLess           = -1;          { Bkm1 < Bkm2 }
  733.     CMPEql            = 0;           { BookMarks are exactly the same }
  734.     CMPGtr            = 1;           { Bkm1 > Bkm2 }
  735.     CMPKeyEql         = 2;           { Only Bkm1.key_val = Bkm2.key_val }
  736.  
  737. {============================================================================}
  738. {                             Key searches                                   }
  739. {============================================================================}
  740.  
  741. type
  742.   DBISearchCond = (                  { Search condition for keys }
  743.     keySEARCHEQ,                     { = }
  744.     keySEARCHGT,                     { > }
  745.     keySEARCHGEQ                     { >= }
  746.   );
  747.  
  748.  
  749. {============================================================================}
  750. {                      Create/Restructure descriptor                         }
  751. {============================================================================}
  752.  
  753. type
  754.   pCROpType          = ^CROpType;
  755.   CROpType = (                       { Create/Restruct Operation type }
  756.     crNOOP,
  757.     crADD,                           { Add a new element. }
  758.     crCOPY,                          { Copy an existing element. }
  759.     crMODIFY,                        { Modify an element. }
  760.     crDROP,                          { Removes an element. }
  761.     crREDO,                          { Reconstruct an element. }
  762.     crTABLE,                         { Not used }
  763.     crGROUP,                         { Not used }
  764.     crFAMILY,                        { Not used }
  765.     crDONE,                          { Used internally }
  766.     crDROPADD                        { Used internally }
  767.   );
  768.  
  769. type
  770.   pCRTblDesc         = ^CRTblDesc;
  771.   CRTblDesc = record                 { Create/Restruct Table descr }
  772.     szTblName       : DBITBLNAME;    { TableName incl. optional path & ext }
  773.     szTblType       : DBINAME;       { Driver type (optional) }
  774.     szErrTblName    : DBIPATH;       { Error Table name (optional) }
  775.     szUserName      : DBINAME;       { User name (if applicable) }
  776.     szPassword      : DBINAME;       { Password (optional) }
  777.     bProtected      : Bool;          { Master password supplied in szPassword }
  778.     bPack           : Bool;          { Pack table (restructure only) }
  779.     iFldCount       : Word;          { Number of field defs supplied }
  780.     pecrFldOp       : pCROpType;     { Array of field ops }
  781.     pfldDesc        : pFLDDesc;      { Array of field descriptors }
  782.     iIdxCount       : Word;          { Number of index defs supplied }
  783.     pecrIdxOp       : pCROpType;     { Array of index ops }
  784.     pidxDesc        : PIDXDesc;      { Array of index descriptors }
  785.     iSecRecCount    : Word;          { Number of security defs supplied }
  786.     pecrSecOp       : pCROpType;     { Array of security ops }
  787.     psecDesc        : pSECDesc;      { Array of security descriptors }
  788.     iValChkCount    : Word;          { Number of val checks }
  789.     pecrValChkOp    : pCROpType;     { Array of val check ops }
  790.     pvchkDesc       : pVCHKDesc;     { Array of val check descs }
  791.     iRintCount      : Word;          { Number of ref int specs }
  792.     pecrRintOp      : pCROpType;     { Array of ref int ops }
  793.     printDesc       : pRINTDesc;     { Array of ref int specs }
  794.     iOptParams      : Word;          { Number of optional parameters }
  795.     pfldOptParams   : pFLDDesc;      { Array of field descriptors }
  796.     pOptData        : Pointer;       { Optional parameters }
  797.   end;
  798.  
  799. {============================================================================}
  800. {                      Batch                                                 }
  801. {============================================================================}
  802.  
  803. type
  804.   pBATTblDesc        = ^BATTblDesc;
  805.   BATTblDesc = record                { Batch Table definition struct }
  806.     hDb             : hDBIDb;        { Database }
  807.     szTblName       : DBIPATH;       { Table name }
  808.     szTblType       : DBINAME;       { Optional Driver type }
  809.     szUserName      : DBINAME;       { Optional User name }
  810.     szPassword      : DBINAME;       { Optional Pass word }
  811.   end;
  812.  
  813.   eBATMode = (                       { Batch mode for DBIBatchMove }
  814.     batchAPPEND,
  815.     batchUPDATE,
  816.     batchAPPENDUPDATE,
  817.     batchSUBTRACT,
  818.     batchCOPY
  819.   );
  820.  
  821. type
  822.   pSORTOrder         = ^SORTOrder;
  823.   SORTOrder = (                      { Sort Order }
  824.     sortASCEND,                      { ascending (default) }
  825.     sortDESCEND                      { descending }
  826.   );
  827.  
  828.   ppfSORTCompFn = ^pfSORTCompFn;
  829.   pfSORTCompFn = function (          { pntr to client compare fn }
  830. var   LdObj         : Pointer;       { Language driver, if needed }
  831. var   Value1        : Pointer;       { first value }
  832. var   Value2        : Pointer;       { second value }
  833.       iLen          : Integer        { Length, if needed }
  834.    ): Integer;
  835.  
  836.    { Returns: -1 if (Value 1 < Value 2),  }
  837.    {           0 if (Value 1 == Value 2), }
  838.    {          +1 if (Value 1 > Value 2)   }
  839.  
  840.  
  841. {============================================================================}
  842. {                       Types/Structs for Capabilities                       }
  843. {============================================================================}
  844.  
  845. type
  846.   DRVCat = (                         { Driver Category }
  847.     drvFILLER,                       { Filler to make next start at 1 }
  848.     drvFILE,                         { File based (Paradox, xBASE) }
  849.     drvOTHERSERVER,                  { Other kind of server (IMS ?) }
  850.     drvSQLBASEDSERVER                { SQL Based Server }
  851.   );
  852.  
  853.   OPType = (                         { Config info & Optional Parameters }
  854.     opFILLER0,                       { Filler to make first one 3 }
  855.     opFILLER1,                       { Filler to make first one 3 }
  856.     opFILLER2,                       { Filler to make first one 3 }
  857.     opDBCREATE,
  858.     opDBOPEN,
  859.     opTBLCREATE,
  860.     opTBLOPEN
  861.   );
  862.  
  863. type
  864.   pDRVType = ^DRVType;
  865.   DRVType = record                   { Driver Description/Capabilities }
  866.     szType          : DBINAME;       { Symbolic name to identify }
  867.     szText          : DBINAME;       { Descriptive text }
  868.     edrvCat         : DRVCat;        { Driver category }
  869.     bTrueDb         : Bool;          { Supports True Db concept }
  870.     szDbType        : DBINAME;       { Db Type to be used }
  871.     bMultiUser      : Bool;          { Supports Multi-user access }
  872.     bReadWrite      : Bool;          { Read Write or Read-only }
  873.     bTrans          : Bool;          { Supports Transactions }
  874.     bPassThruSQL    : Bool;          { Supports Pass-thru SQL }
  875.     bLogIn          : Bool;          { Requires explicit login }
  876.     bCreateDb       : Bool;          { Can reate a Database }
  877.     bDeleteDb       : Bool;          { Can drop database }
  878.     bCreateTable    : Bool;          { Can create a Table }
  879.     bDeleteTable    : Bool;          { Can delete a Table }
  880.     bMultiplePWs    : Bool;          { Multiple passwords }
  881.     iDriverVersion  : Word;          { Driver version 1..n }
  882.     bSQLRowid       : Bool;          { Supports SQL rowid }
  883.     iUnUsed         : array [0..14] of Word;
  884.   end;
  885.  
  886.  
  887.   pTBLType = ^TBLType;
  888.   TBLType = record                   { Table Capabilities }
  889.     iId             : Word;          { Id of Table Type }
  890.     szName          : DBINAME;       { Symbolic name; eg "dBASE" }
  891.     szText          : DBINAME;       { Descriptive text }
  892.     szFormat        : DBINAME;       { Format; eg "HEAP" }
  893.     bReadWrite      : Bool;          { User can Read/Write }
  894.     bCreate         : Bool;          { Can create new tables }
  895.     bRestructure    : Bool;          { Can restructure this table }
  896.     bValChecks      : Bool;          { Val Checks can be specified }
  897.     bSecurity       : Bool;          { Can be protected }
  898.     bRefIntegrity   : Bool;          { Can participate in ref integrity }
  899.     bPrimaryKey     : Bool;          { Supports primary key concept }
  900.     bIndexing       : Bool;          { Can have other indexes }
  901.     iFldTypes       : Word;          { Number of Phy Field types supported }
  902.     iMaxRecSize     : Word;          { Max record size }
  903.     iMaxFldsInTable : Word;          { Max fields in a table }
  904.     iMaxFldNameLen  : Word;          { Maximum field name length }
  905.     iTblLevel       : Word;          { Driver dependent table level (version) }
  906.     iUnUsed         : array [0..15] of Word;
  907.   end;
  908.  
  909.  
  910.   pIDXType = ^IDXType;
  911.   IDXType = record
  912.     iId             : Word;          { Id of index type }
  913.     szName          : DBINAME;       { Symbolic name }
  914.     szText          : DBINAME;       { Descriptive text }
  915.     szFormat        : DBINAME;       { Optional format(BTREE, HASH etc) }
  916.     bComposite      : Bool;          { If composite keys are supported }
  917.     bPrimary        : Bool;          { True, if primary index }
  918.     bUnique         : Bool;          { True, No duplicates supported }
  919.     bKeyDescending  : Bool;          { If whole key can be descending }
  920.     bFldDescending  : Bool;          { Field level descending }
  921.     bMaintained     : Bool;          { Supports maintained option }
  922.     bSubset         : Bool;          { If Subset expression supported }
  923.     bKeyExpr        : Bool;          { If Key can be expression }
  924.     bCaseInsensitive : Bool;         { If Keyinsensitive indexes supported }
  925.     iUnUsed         : array [0..15] of Word;
  926.   end;
  927.  
  928.   pFLDType = ^FLDType;
  929.   FLDType = record
  930.     iId             : Word;          { Id of Field Type }
  931.     szName          : DBINAME;       { Symbolic name; eg "ALPHA" }
  932.     szText          : DBINAME;       { Descriptive text }
  933.     iPhyType        : Word;          { Physical/Native type }
  934.     iXltType        : Word;          { Default xlated type }
  935.     iXltSubType     : Word;          { Default xlated sub type }
  936.     iMaxUnits1      : Word;          { Max units allowed (1) }
  937.     iMaxUnits2      : Word;          { Max units allowed (2) }
  938.     iPhySize        : Word;          { Physical size in bytes (per unit) }
  939.     bRequired       : Bool;          { Supports 'required' option }
  940.     bDefaultVal     : Bool;          { Supports user specified 'default' }
  941.     bMinVal         : Bool;          { Supports MIN Val constraint }
  942.     bMaxVal         : Bool;          { Supports MAX Val constraint }
  943.     bRefIntegrity   : Bool;          { Can participate in ref integrity }
  944.     bOtherChecks    : Bool;          { Supports other kinds of checks }
  945.     bKeyed          : Bool;          { The field type can be keyed }
  946.     bMultiplePerTable : Bool;        { Table can have more than 1 of this type }
  947.     iMinUnits1      : Word;          { Min units required (1) }
  948.     iMinUnits2      : Word;          { Min units required (2) }
  949.     bCreateable     : Bool;          { Type can be created }
  950.     iUnUsed         : array [0..15] of Word;
  951.   end;
  952.  
  953.   PROPValid = (                      { PROP Validity }
  954.     epropINVALID,                    { Property is INVALID (not supported) }
  955.     epropCANGET,                     { You can GET value of the property }
  956.     epropCANSET                      { You can GET and SET value of the property }
  957.   );
  958.  
  959. {============================================================================}
  960. {                                Call Backs                                  }
  961. {============================================================================}
  962.  
  963. type
  964.   pCBType            = ^CBType;
  965.  
  966.   CBType = (                         { Call back type }
  967.     cbGENERAL,                       { General purpose }
  968.     cbRESERVED1,
  969.     cbRESERVED2,
  970.     cbRESERVED3,
  971.     cbRESERVED4,
  972.     cbRESERVED5,
  973.     cbBATCHRESULT,                   { Batch processing rslts }
  974.     cbRESERVED7,
  975.     cbRESTRUCTURE,                   { Restructure }
  976.     cbRESERVED9,
  977.     cbRESERVED10,
  978.     cbRESERVED11,
  979.     cbRESERVED12,
  980.     cbRESERVED13,
  981.     cbRESERVED14,
  982.     cbRESERVED15,
  983.     cbRESERVED16,
  984.     cbRESERVED17,
  985.     cbTABLECHANGED,                  { Table changed notification }
  986.     cbRESERVED19,
  987.     cbRESERVED20,
  988.     cbRESERVED21,
  989.     cbRESERVED22,
  990.     cbGENPROGRESS,                   { Generic Progress report. }
  991.     cbRESERVED24,
  992.     cbNBROFCBS                       { Number of cbs }
  993.   );
  994.  
  995.   pCBRType           = ^CBRType;
  996.   CBRType = (                        { Call-back return type }
  997.     cbrUSEDEF,                       { Take default action }
  998.     cbrCONTINUE,                     { Continue }
  999.     cbrABORT,                        { Abort the operation }
  1000.     cbrCHKINPUT,                     { Input given }
  1001.     cbrYES,                          { Take requested action }
  1002.     cbrNO,                           { Do not take requested action }
  1003.     cbrPARTIALASSIST                 { Assist in completing the job }
  1004.   );
  1005.  
  1006. type
  1007.   ppfDBICallBack = ^pfDBICallBack;
  1008.   pfDBICallBack  = function (        { Call-back funtion pntr type }
  1009.       ecbType       : CBType;        { Callback type }
  1010.       iClientData   : Longint;       { Client callback data }
  1011. var   CbInfo        : Pointer        { Call back info/Client Input }
  1012.    ): CBRType;
  1013.  
  1014.  
  1015. { Progress callback structure }
  1016.  
  1017.   pCBPROGRESSDesc    = ^CBPROGRESSDesc;
  1018.   CBPROGRESSDesc = record
  1019.     iPercentDone    : Integer;       { Percentage done. }
  1020.     szMsg           : DBIMSG;        { Message to display }
  1021.   end;
  1022.  
  1023.   RESTErrObjType = (                 { type of restructure object (restructure callback) }
  1024.     restrNONE,
  1025.     restrNEWFLD,
  1026.     restrOLDFLD,
  1027.     restrNEWINDEX,
  1028.     restrOLDINDEX,
  1029.     restrNEWVCHK,
  1030.     restrOLDVCHK,
  1031.     restrNEWRINT,
  1032.     restrOLDRINT,
  1033.     restrNEWSEC,
  1034.     restrOLDSEC,
  1035.     restrNEWTABLE
  1036.   );
  1037.  
  1038. type
  1039.   TuObjDesc = record
  1040.     case Integer of
  1041.       1: (fldDesc:  FLDDesc);
  1042.       2: (idxDesc:  IDXDesc);
  1043.       3: (vchkDesc: VCHKDesc);
  1044.       4: (rintDesc: RINTDesc);
  1045.       5: (secDesc:  SECDesc);
  1046.   end;
  1047.  
  1048.   RESTCbDesc = record                { restructure callback info }
  1049.     iErrCode        : DBIResult;
  1050.     iTblNum         : Word;
  1051.     iObjNum         : Word;
  1052.     eRestrObjType   : RESTErrObjType;
  1053.     uObjDesc        : TuObjDesc;
  1054.   end;
  1055.      
  1056. { cbSERVERCALL info }
  1057.  
  1058.   CBSCType = (                          { Server call type }
  1059.     cbscRETURN,                         { Return from a call }
  1060.     cbscSQL                             { SQL server call }
  1061.   );
  1062.  
  1063. const
  1064.   cbSERVERCALL       = cbRESERVED21;
  1065.  
  1066. {============================================================================}
  1067. {                         Basic Query Types                                  }
  1068. {============================================================================}
  1069.  
  1070. type
  1071.   DBIQryLang = (
  1072.     qrylangUNKNOWN,                  { UNKNOWN (Error) }
  1073.     qrylangQBE,                      { QBE }
  1074.     qrylangSQL                       { SQL }
  1075.   );
  1076.  
  1077. {============================================================================}
  1078. {                         Statement parameter information                    }
  1079. {============================================================================}
  1080.  
  1081. type
  1082.   eINDValues = WordEnum;
  1083. const
  1084.     indTRUNC     = -2;                { Value has been truncated }
  1085.     indNULL      = -1;                { Value is NULL }
  1086.     indVALUE     = 1;
  1087.  
  1088. const
  1089.   INDLEN             = sizeof(Word);
  1090.  
  1091. type
  1092.   STMTParamType = (
  1093.     paramUNKNOWN,                    { UNKNOWN (Error) }
  1094.     paramIN,                         { Input parameter }
  1095.     paramOUT,                        { Output parameter }
  1096.     paramINOUT,                      { Input/Output parameter }
  1097.     paramRET                         { Procedure (or function) return }
  1098.   );
  1099.  
  1100.   STMTParamFormat = (
  1101.     paramfmtUNKNOWN,                 { UNKNOWN (Error) }
  1102.     paramfmtNUMBER,                  { Numbered parameter markers of the form ? or :n }
  1103.     paramfmtNAME                     { Named parameters markers of the form :name }
  1104.   );
  1105.  
  1106. {============================================================================}
  1107. {                         Properties For DbiQPrepareExt                      }
  1108. {============================================================================}
  1109.  
  1110. const
  1111.   qprepNONE          = 0;            { like DbiQPrepare }
  1112.   qprepFORUPDATE     = $1;           { do extra work, anticipating UPDATE WHERE CURRENT }
  1113.  
  1114.  
  1115. {============================================================================}
  1116. {                      Date, Time, Number Formats                            }
  1117. {============================================================================}
  1118.  
  1119. type
  1120.   pFMTNumber = ^FMTNumber;
  1121.   FMTNumber = record                 { Date Format }
  1122.     cDecimalSeparator : Char;        { Default "." }
  1123.     cThousandSeparator : Char;       { Default "," }
  1124.     iDecimalDigits  : Byte;          { Default 2 }
  1125.     bLeadingZero    : Boolean;       { Default TRUE. }
  1126.   end;
  1127.  
  1128.   pFMTDate = ^FMTDate;
  1129.   FMTDate = record
  1130.     szDateSeparator : array [0..3] of Char; { Default "/" }
  1131.     iDateMode       : Byte;          { 0 = MDY (Def), 1 = DMY, 2 = YMD }
  1132.     bFourDigitYear  : Boolean;       { Write Year as 4 digits (FALSE) }
  1133.     bYearBiased     : Boolean;       { On input add 1900 to year (TRUE) }
  1134.     bMonthLeadingZero : Boolean;     { Month with Leading Zero (TRUE) }
  1135.     bDayLeadingZero : Boolean;       { Day with Leading Zero (TRUE) }
  1136.   end;
  1137.  
  1138.   pFMTTime = ^FMTTime;
  1139.   FMTTime = record
  1140.     cTimeSeparator  : Char;          { Default ":" }
  1141.     bTwelveHour     : Boolean;       { Represent as 12 Hour time (FALSE) }
  1142.     szAmString      : array [0..5] of Char; { Default Null (Only for 12 Hr) }
  1143.     szPmString      : array [0..5] of Char; { Default Null (Only for 12 Hr) }
  1144.     bSeconds        : Boolean;       { Show Seconds (TRUE) }
  1145.     bMilSeconds     : Boolean;       { Show Milli Seconds (FALSE) }
  1146.   end;
  1147.  
  1148.   pFMTBcd            = ^FMTBcd;
  1149.   FMTBcd = record
  1150.     iPrecision      : Byte;          { 1..64 considered valid }
  1151.     iSignSpecialPlaces : Byte;       { sign:1, special:1, places:6 }
  1152.     iFraction       : array [0..31] of Byte; { bcd nibbles, 00..99 per byte, high nibble 1st }
  1153.   end;
  1154.  
  1155.  
  1156. {============================================================================}
  1157. {                              Error Info                                    }
  1158. {============================================================================}
  1159.  
  1160. type
  1161.   pDBIErrInfo        = ^DBIErrInfo;
  1162.   DBIErrInfo = record                { Error info }
  1163.     iError          : DBIResult;     { Last error code returned }
  1164.     szErrCode       : DBIMSG;        { Error Code }
  1165.     szContext       : array[1..4] of DBIMSG; { Context info }
  1166.   end;
  1167.  
  1168. { Error contexts (To be used with DbiGetErrorContext) }
  1169.  
  1170. const
  1171.   ecTOKEN            = 1;            { Token (For QBE) }
  1172.   ecTABLENAME        = 3;            { Table name }
  1173.   ecFIELDNAME        = 4;            { Field Name }
  1174.   ecIMAGEROW         = 5;            { Image Row (For QBE) }
  1175.   ecUSERNAME         = 6;            { eg, In lock conflicts, user involved }
  1176.   ecFILENAME         = 7;            { File Name }
  1177.   ecINDEXNAME        = 8;            { Index Name }
  1178.   ecDIRNAME          = 9;            { Directory Name }
  1179.   ecKEYNAME          = 10;           { Key Name }
  1180.   ecALIAS            = 11;           { Alias }
  1181.   ecDRIVENAME        = 12;           { Drive name ('c:') }
  1182.   ecNATIVECODE       = 13;           { Native error code }
  1183.   ecNATIVEMSG        = 14;           { Native error message }
  1184.   ecLINENUMBER       = 15;           { Line Number }
  1185.   ecCAPABILITY       = 16;           { Capability }
  1186.  
  1187. {============================================================================}
  1188. {                  Schema info structures                                    }
  1189. {============================================================================}
  1190. {                    Database descriptor                                     }
  1191. {============================================================================}
  1192.  
  1193.  
  1194. { DbiOpenDbList }
  1195. type
  1196.   pDBDesc = ^DBDesc;
  1197.   DBDesc = record                    { A given Database Description }
  1198.     szName          : DBINAME;       { Logical name (Or alias) }
  1199.     szText          : DBINAME;       { Descriptive text }
  1200.     szPhyName       : DBIPATH;       { Physical name/path }
  1201.     szDbType        : DBINAME;       { Database type }
  1202.   end;
  1203.  
  1204.  
  1205. {============================================================================}
  1206. {                    User info descriptor                                    }
  1207. {============================================================================}
  1208.  
  1209.  
  1210. { DbiOpenUserList }
  1211. type
  1212.   pUSERDesc = ^USERDesc;
  1213.   USERDesc = record                  { User description }
  1214.     szUserName      : DBIUSERNAME;
  1215.     iNetSession     : Word;          { Net level session number }
  1216.     iProductClass   : Word;          { Product class of user }
  1217.     szSerialNum     : array [0..21] of Char; { Serial number }
  1218.   end;
  1219.  
  1220. {============================================================================}
  1221. {                    Table descriptor                                        }
  1222. {============================================================================}
  1223.  
  1224.  
  1225. { DbiOpenTableList }
  1226. type
  1227.   pTBLBaseDesc = ^TBLBaseDesc;
  1228.   TBLBaseDesc = record               { Table description (Base) }
  1229.     szName          : DBITBLNAME;    { Table name(No extension or Dir) }
  1230.     szFileName      : DBITBLNAME;    { File name }
  1231.     szExt           : DBIEXT;        { File extension }
  1232.     szType          : DBINAME;       { Driver type }
  1233.     dtDate          : Date;          { Date on the table }
  1234.     tmTime          : Time;          { Time on the table }
  1235.     iSize           : Longint;       { Size in bytes }
  1236.     bView           : Bool;          { If this a view }
  1237.   end;
  1238.  
  1239.   pTBLExtDesc = ^TBLExtDesc;
  1240.   TBLExtDesc = record                { Table description (Extended part) }
  1241.     szStruct        : DBINAME;       { Physical structure }
  1242.     iRestrVersion   : Word;          { Version # }
  1243.     iRecSize        : Word;          { Physical record size }
  1244.     iFields         : Word;          { Number of fields }
  1245.     iIndexes        : Word;          { Number Indexes }
  1246.     iValChecks      : Word;          { Number of field validity checks }
  1247.     iRintChecks     : Word;          { Number of ref. integrity checks }
  1248.     iRecords        : Longint;       { Number of records in table }
  1249.     bProtected      : Bool;          { If the table is prot }
  1250.     bValidInfo      : Bool;          { Info available for this table }
  1251.   end;
  1252.  
  1253.   pTBLFullDesc = ^TBLFullDesc;
  1254.   TBLFullDesc = record               { Table description (Base + Ext) }
  1255.     tblBase         : TBLBaseDesc;   { Base      description }
  1256.     tblExt          : TBLExtDesc;    { Extended  description }
  1257.   end;
  1258.  
  1259. {============================================================================}
  1260. {                    File descriptor                                         }
  1261. {============================================================================}
  1262.  
  1263.  
  1264. { DbiOpenFileList }
  1265. type
  1266.   pFILEDesc = ^FILEDesc;
  1267.   FILEDesc = record                  { File description }
  1268.     szFileName      : DBIPATH;       { File name (No Dir or ext) }
  1269.     szExt           : DBIEXT;        { Extension }
  1270.     bDir            : Bool;          { True, if directory }
  1271.     iSize           : Longint;       { File size in bytes }
  1272.     dtDate          : Date;          { Date on the file }
  1273.     tmTime          : Time;          { Time on the file }
  1274.   end;
  1275.  
  1276. {======================================================================}
  1277. {            Stored Procedure and Stored Procedure Param descriptor    }
  1278. {======================================================================}
  1279.  
  1280. type
  1281.   pSPDesc = ^SPDesc;
  1282.   SPDesc = record
  1283.     szName          : DBISPNAME;
  1284.     dtDate          : Date;
  1285.     tmTime          : Time;
  1286.   end;
  1287.  
  1288.   pSPParamDesc = ^SPParamDesc;
  1289.   SPParamDesc = record
  1290.     uParamNum       : Word;
  1291.     szName          : DBINAME;
  1292.     eParamType      : STMTParamType;
  1293.     uFldType        : Word;
  1294.     uSubType        : Word;
  1295.     iUnits1         : Integer;
  1296.     iUnits2         : Integer;
  1297.     uOffset         : Word;
  1298.     uLen            : Word;
  1299.     uNullOffset     : Word;
  1300.   end;
  1301.  
  1302. {============================================================================}
  1303. {                   Configuration Info Descriptor                            }
  1304. {============================================================================}
  1305.  
  1306.   CFGMode = (
  1307.     cfgPersistent,                   { Persistent only }
  1308.     cfgSession,                      { Session relative only }
  1309.     cfgAll                           { All (union) }
  1310.   );
  1311.  
  1312.  
  1313. { DbiOpenCfgInfoList }
  1314. type
  1315.   pCFGDesc = ^CFGDesc;
  1316.   CFGDesc = record                   { Config description }
  1317.     szNodeName      : DBINAME;       { Node name }
  1318.     szDescription   : array [0..DBIMAXSCFLDLEN-1] of Char; { Node description }
  1319.     iDataType       : Word;          { Value type }
  1320.     szValue         : array [0..DBIMAXSCFLDLEN-1] of Char; { Value }
  1321.     bHasSubnodes    : Bool;          { True, if not leaf node }
  1322.   end;
  1323.  
  1324.  
  1325. {============================================================================}
  1326. {                    Family descriptor                                       }
  1327. {============================================================================}
  1328.  
  1329. type
  1330.   pFMLType           = ^FMLType;
  1331.   FMLType = (                        { Family member types }
  1332.     fmlUNKNOWN,
  1333.     fmlTABLE,
  1334.     fmlINDEX,
  1335.     fmlFORM,
  1336.     fmlREPORT,
  1337.     fmlVALCHECK,
  1338.     fmlSECINDEX,
  1339.     fmlSECINDEX2,
  1340.     fmlBLOBFILE
  1341.   );
  1342.  
  1343. { DbiOpenFamilyList }
  1344. type
  1345.   pFMLDesc = ^FMLDesc;
  1346.   FMLDesc = record                   { Family record structure }
  1347.     szName          : DBINAME;       { Member name (documentary) }
  1348.     iId             : Word;          { Id (if applicable) }
  1349.     eType           : FMLType;       { Member type }
  1350.     szFileName      : DBIPATH;       { File name of member }
  1351.   end;
  1352.  
  1353.  
  1354. {============================================================================}
  1355. {                    Language driver descriptor                              }
  1356. {============================================================================}
  1357.  
  1358.  
  1359. const
  1360.   DBIOEM_CP          = 1;            { (dos) }
  1361.   DBIANSI_CP         = 2;            { (win) }
  1362.   DBIOS2_CP          = 3;
  1363. (* UNIX etc. *)
  1364.   DBISUNOS_CP        = 4;
  1365.   DBIVMS_CP          = 5;
  1366.   DBIHPUX_CP         = 6;
  1367.   DBIULTRIX_CP       = 7;
  1368.   DBIAIX_CP          = 8;
  1369.   DBIAUX_CP          = 9;
  1370.   DBIXENIX_CP        = 10;
  1371.   DBIMAC_CP          = 11;
  1372.   DBINEXT_CP         = 12;
  1373.  
  1374. { DbiOpenLdList }
  1375. type
  1376.   pLDDesc = ^LDDesc;
  1377.   LDDesc = record                    { Lang Driver description }
  1378.     szName          : DBINAME;       { Driver symbolic name }
  1379.     szDesc          : DBINAME;       { Description }
  1380.     iCodePage       : Word;
  1381.     PrimaryCpPlatform : Word;
  1382.     AlternateCpPlatform : Word;
  1383.   end;
  1384.  
  1385. {============================================================================}
  1386. {                    Lock descriptor                                         }
  1387. {============================================================================}
  1388.  
  1389. { Lock types in LOCKDesc: }
  1390.  
  1391. const
  1392.   lckRECLOCK         = 0;            { Normal Record lock (Write) }
  1393.   lckRRECLOCK        = 1;            { Special Pdox Record lock (Read) }
  1394.   lckGROUPLOCK       = 2;            { Pdox Group lock }
  1395.   lckIMGAREA         = 3;            { Pdox Image area }
  1396.   lckTABLEREG        = 4;            { Table registration/Open (No lock) }
  1397.   lckTABLEREAD       = 5;            { Table Read lock }
  1398.   lckTABLEWRITE      = 6;            { Table Write lock }
  1399.   lckTABLEEXCL       = 7;            { Table Exclusive lock }
  1400.   lckUNKNOWN         = 9;            { Unknown lock }
  1401.  
  1402. { DbiOpenLockList }
  1403. type
  1404.   pLOCKDesc = ^LOCKDesc;
  1405.   LOCKDesc = record                  { Lock Description }
  1406.     iType           : Word;          { Lock type (0 for rec lock) }
  1407.     szUserName      : DBIUSERNAME;   { Lock owner }
  1408.     iNetSession     : Word;          { Net level Session number }
  1409.     iSession        : Word;          { Idapi session#, if our lock }
  1410.     iRecNum         : Longint;       { If a record lock }
  1411.     iInfo           : Word;          { Info for table locks }
  1412.   end;
  1413.  
  1414. {============================================================================}
  1415. {                    Filter description                                      }
  1416. {============================================================================}
  1417.  
  1418. type
  1419.   pCANOp             = ^CANOp;
  1420.   CANOp = (
  1421.     canNOTDEFINED,                   {                                  (*) }
  1422.     canISBLANK,                      { CANUnary;  is operand blank.     (*) }
  1423.     canNOTBLANK,                     { CANUnary;  is operand not blank. (*) }
  1424.     canEQ,                           { CANBinary, CANCompare; equal.    (*) }
  1425.     canNE,                           { CANBinary; NOT equal.            (*) }
  1426.     canGT,                           { CANBinary; greater than.         (*) }
  1427.     canLT,                           { CANBinary; less than.            (*) }
  1428.     canGE,                           { CANBinary; greater or equal.     (*) }
  1429.     canLE,                           { CANBinary; less or equal.        (*) }
  1430.     canNOT,                          { CANUnary; NOT                    (*) }
  1431.     canAND,                          { CANBinary; AND                   (*) }
  1432.     canOR,                           { CANBinary; OR                    (*) }
  1433.     canTUPLE2,                       { CANUnary; Entire record is operand. }
  1434.     canFIELD2,                       { CANUnary; operand is field       (*) }
  1435.     canCONST2,                       { CANUnary; operand is constant    (*) }
  1436.     canMINUS,                        { CANUnary;  minus. }
  1437.     canADD,                          { CANBinary; addition. }
  1438.     canSUB,                          { CANBinary; subtraction. }
  1439.     canMUL,                          { CANBinary; multiplication. }
  1440.     canDIV,                          { CANBinary; division. }
  1441.     canMOD,                          { CANBinary; modulo division. }
  1442.     canREM,                          { CANBinary; remainder of division. }
  1443.     canSUM,                          { CANBinary, accumulate sum of. }
  1444.     canCOUNT,                        { CANBinary, accumulate count of. }
  1445.     canMIN,                          { CANBinary, find minimum of. }
  1446.     canMAX,                          { CANBinary, find maximum of. }
  1447.     canAVG,                          { CANBinary, find average of. }
  1448.     canCONT,                         { CANBinary; provides a link between two }
  1449.     canUDF2,                         { CANBinary; invokes a User defined fn }
  1450.     canCONTINUE2,                    { CANUnary; Stops evaluating records }
  1451.     canLIKE                          { CANCompare, extended binary compare       (*) }
  1452.   );
  1453.  
  1454.   NODEClass = (                      { Node Class }
  1455.     nodeNULL,                        { Null node                  (*) }
  1456.     nodeUNARY,                       { Node is a unary            (*) }
  1457.     nodeBINARY,                      { Node is a binary           (*) }
  1458.     nodeCOMPARE,                     { Node is a compare          (*) }
  1459.     nodeFIELD,                       { Node is a field            (*) }
  1460.     nodeCONST,                       { Node is a constant         (*) }
  1461.     nodeTUPLE,                       { Node is a record }
  1462.     nodeCONTINUE,                    { Node is a continue node    (*) }
  1463.     nodeUDF                          { Node is a UDF node }
  1464.   );
  1465.  
  1466. { NODE definitions including misc data structures }
  1467. {-------------------------------------------------}
  1468.  
  1469. type
  1470.   pCANHdr = ^CANHdr;
  1471.   CANHdr = record                    { Header part common to all     (*) }
  1472.     nodeClass       : NODEClass;
  1473.     canOp           : CANOp;
  1474.   end;
  1475.  
  1476.   pCANUnary = ^CANUnary;
  1477.   CANUnary = record                  { Unary Node                    (*) }
  1478.     nodeClass       : NODEClass;
  1479.     canOp           : CANOp;
  1480.     iOperand1       : Word;          { Byte offset of Operand node }
  1481.   end;
  1482.  
  1483.   pCANBinary = ^CANBinary;
  1484.   CANBinary = record                 { Binary Node                   (*) }
  1485.     nodeClass       : NODEClass;
  1486.     canOp           : CANOp;
  1487.     iOperand1       : Word;          { Byte offset of Op1 }
  1488.     iOperand2       : Word;          { Byte offset of Op2 }
  1489.   end;
  1490.  
  1491.   pCANField = ^CANField;
  1492.   CANField = record                  { Field }
  1493.     nodeClass       : NODEClass;
  1494.     canOp           : CANOp;
  1495.     iFieldNum       : Word;
  1496.     iNameOffset     : Word;          { Name offset in Literal pool }
  1497.   end;
  1498.  
  1499.   pCANConst = ^CANConst;
  1500.   CANConst = record                  { Constant }
  1501.     nodeClass       : NODEClass;
  1502.     canOp           : CANOp;
  1503.     iType           : Word;          { Constant type. }
  1504.     iSize           : Word;          { Constant size. (in bytes) }
  1505.     iOffset         : Word;          { Offset in the literal pool. }
  1506.   end;
  1507.  
  1508.   pCANTuple = ^CANTuple;
  1509.   CANTuple = record                  { Tuple (record) }
  1510.     nodeClass       : NODEClass;
  1511.     canOp           : CANOp;
  1512.     iSize           : Word;          { Record size. (in bytes) }
  1513.   end;
  1514.  
  1515.   pCANContinue = ^CANContinue;
  1516.   CANContinue = record               { Break Node                    (*) }
  1517.     nodeClass       : NODEClass;
  1518.     canOp           : CANOp;
  1519.     iContOperand    : Word;          { Continue if operand is true. }
  1520.   end;
  1521.  
  1522.   pCANCompare = ^CANCompare;
  1523.   CANCompare = record                { Extended compare Node (text fields) (*) }
  1524.     nodeClass       : NODEClass;
  1525.     canOp           : CANOp;         { canLIKE, canEQ }
  1526.     bCaseInsensitive : Bool;         { 3 val: UNKNOWN = "fastest", "native" }
  1527.     iPartialLen     : Word;          { Partial fieldlength (0 is full length) }
  1528.     iOperand1       : Word;          { Byte offset of Op1 }
  1529.     iOperand2       : Word;          { Byte offset of Op2 }
  1530.   end;
  1531.  
  1532. {This is the node to be used to pass User defined functions }
  1533. const
  1534.   iLangSQL           = 0;            { Common SQL dialect }
  1535.   iDbaseExpr         = 2;            { This is also the driver ID for dBASE }
  1536.  
  1537. type
  1538.   pCANUdf = ^CANUdf;
  1539.   CANUdf = record                    { A user defined function }
  1540.     nodeClass       : NODEClass;
  1541.     canOp           : CANOp;
  1542.     iOffSzFuncName  : Word;          { Offset in literal pool to Function Name string(0 terminated) }
  1543.     iOperands       : Word;          { Byte offset of Operands (concatenated using canCONT) }
  1544.     iDrvDialect     : Word;          { Driver Dialect ID for UDF string supplied }
  1545.     iOffSzUDF       : Word;          { Offset in literal pool to UDF string (0 terminated) }
  1546.   end;
  1547.  
  1548.   pCANNode = ^CANNode;
  1549.   CANNode = record
  1550.     case Integer of
  1551.       1: (canHdr      : CANHdr);
  1552.       2: (canUnary    : CANUnary);
  1553.       3: (canBinary   : CANBinary);
  1554.       4: (canField    : CANField);
  1555.       5: (canConst    : CANConst);
  1556.       6: (canTuple    : CANTuple);
  1557.       7: (canContinue : CANContinue);
  1558.       8: (canCompare  : CANCompare);
  1559.   end;
  1560.  
  1561. { Linear exression tree}
  1562. {----------------------}
  1563.  
  1564. const
  1565.   CANEXPRVERSION     = 2;
  1566.  
  1567. type
  1568.   ppCANExpr = ^pCANExpr;
  1569.   pCANExpr  = ^CANExpr;
  1570.   CANExpr   = record                 { Expression Tree }
  1571.     iVer            : Word;          { Version tag of expression. }
  1572.     iTotalSize      : Word;          { Size of this structure }
  1573.     iNodes          : Word;          { Number of nodes }
  1574.     iNodeStart      : Word;          { Starting offet of Nodes in this }
  1575.     iLiteralStart   : Word;          { Starting offset of Literals in this }
  1576.   end;
  1577.  
  1578.  
  1579. {pfGENFilter returns TRUE, FALSE or ABORT }
  1580. const
  1581.   ABORT              = -2;
  1582.  
  1583. type
  1584.   pfGENFilter = function (
  1585.       ulClientData  : Longint;
  1586.       pRecBuf       : Pointer;
  1587.       iPhyRecNum    : Longint
  1588.    ): Integer;
  1589.  
  1590.   pFILTERInfo = ^FILTERInfo;
  1591.   FILTERInfo = record
  1592.     iFilterId       : Word;          { Id for filter }
  1593.     hFilter         : hDBIFilter;    { Filter handle }
  1594.     iClientData     : Longint;       { Client supplied data }
  1595.     iPriority       : Word;          { 1..N with 1 being highest }
  1596.     bCanAbort       : Bool;          { TRUE : pfFilter can return ABORT }
  1597.     pfFilter        : pfGENFilter;   { Client filter function }
  1598.     pCanExpr        : Pointer;       { Supplied expression }
  1599.     bActive         : Bool;          { TRUE : filter is active }
  1600.   end;
  1601.  
  1602. {----------------------------------------------------------------------------}
  1603. {   DBI Query related types                                                  }
  1604. {----------------------------------------------------------------------------}
  1605.  
  1606. const
  1607.   MAXQBEEXPRSIZE     = 300;          { size of one QBE expr }
  1608.  
  1609. {----------------------------------------------------------------------------}
  1610.  
  1611. type
  1612.   pDBIQryProp = ^DBIQryProp;
  1613.   DBIQryProp = record
  1614.     szQryName       : DBINAME;       { Name of query }
  1615.     eLang           : DBIQryLang;    { Language }
  1616.     iQryPrice       : Integer;       { Query price 1..100 (1 = cheap, 100 = expensive) }
  1617.     iNumTables      : Integer;       { Number of tables in join.  0 = unknown. }
  1618.     bHasAnswer      : Bool;
  1619.     bInsert         : Bool;
  1620.     bDelete         : Bool;
  1621.     bChange         : Bool;
  1622.   end;
  1623.  
  1624. {----------------------------------------------------------------------------}
  1625.  
  1626. const
  1627.   DBIQBE_ANSWERBIT   = ($1);         { Answer table bit flag }
  1628.   DBIQBE_INSERTEDBIT = ($2);         { Inserted table bit flag }
  1629.   DBIQBE_DELETEDBIT  = ($4);         { Deleted table bit flag }
  1630.   DBIQBE_CHANGEDBIT  = ($8);         { Changed table bit flag }
  1631.   DBIQBE_ERRORINSBIT = ($10);        { Error inserted table bit flag }
  1632.   DBIQBE_ERRORDELBIT = ($20);        { Error deleted table bit flag }
  1633.   DBIQBE_ERRORCHGBIT = ($40);        { Error changed table bit flag }
  1634.  
  1635.  
  1636. { answer cursor properties: }
  1637.   bAnsHasLiveFields  = $1;
  1638.   bAnsHasFilter      = $2;
  1639.   bAnsHasFieldMap    = $4;
  1640.   bAnsHasCalcField   = $8;
  1641.   bAnsHasLiveBlob    = $10;
  1642.  
  1643. { answer field properties: }
  1644.   bIsAnsFieldLive    = $1;
  1645.  
  1646. {----------------------------------------------------------------------------}
  1647.  
  1648. type
  1649.   DBIQryType = (
  1650.     dbiqryDEFAULT,
  1651.     dbiqryDIRTY,
  1652.     dbiqryCLEAN,
  1653.     dbiqryRESTART
  1654.   );
  1655.  
  1656. {----------------------------------------------------------------------------}
  1657.  
  1658. type
  1659.   pDBIQryProgress = ^DBIQryProgress;
  1660.   DBIQryProgress = record
  1661.     stepsInQry      : Word;          { Total steps in query. }
  1662.     stepsCompleted  : Word;          { Steps completed out of total (steps may be skipped). }
  1663.     totElemInStep   : Longint;       { Total elements in current step. }
  1664.     elemCompleted   : Longint;       { Elements completed in current step. }
  1665.   end;
  1666.  
  1667. { values for client indicating live/canned preference about query execution }
  1668.  
  1669.   QryEvalMode = (
  1670.     qryModeNone,                     { Reserved }
  1671.     qryModeLOCAL,
  1672.     qryModeSERVER,
  1673.     qryModeEITHER,
  1674.     qryModeNOWLOCAL                  { used only in call back, when failed on server }
  1675.   );
  1676.  
  1677.   LIVENESS = (
  1678.     wantDEFAULT,                     { Default , same as wantCANNED }
  1679.     wantLIVE,                        { Want live data even if extra effort (no guarantee) }
  1680.     wantCANNED,                      { Want canned data even if extra effort (guaranteed) }
  1681.     wantSPEED                        { Let query manager decide, find out afterwards }
  1682.   );
  1683.  
  1684. type
  1685.   pQueryLowProps = ^QueryLowProps;
  1686.   QueryLowProps = record
  1687.     length          : Integer;       { Length in bytes of this structure }
  1688.     blankzeroes     : Bool;          { TRUE if blanks to be regarded as zeros }
  1689.     dateFormat      : FMTDate;       { Date format }
  1690.     numberFormat    : FMTNumber;     { Number format }
  1691.     bNeedAuxTbls    : Bool;          { if FALSE, don't bother with DELETED/ERRDEL, etc. }
  1692.     qryMode         : QryEvalMode;   { qryModeSERVER, qryModeLOCAL or qryModeEITHER. }
  1693.     perQrySqlMode   : Bool;
  1694.     livenessDesired : LIVENESS;
  1695.   end;
  1696.  
  1697. {============================================================================}
  1698. {                      DBI symbols                                           }
  1699. {============================================================================}
  1700.  
  1701. const
  1702.   DBIMOD_BEGIN       = ($3F00);
  1703.  
  1704.   DBIMOD_QBE         = (DBIMOD_BEGIN + 1);
  1705.   DBIMOD_SQLG        = (DBIMOD_BEGIN + 2);
  1706.   DBIMOD_LEGO        = (DBIMOD_BEGIN + 3);
  1707.   DBIMOD_LOCKMNGR    = (DBIMOD_BEGIN + 4);
  1708.   DBIMOD_SQLDRIVER   = (DBIMOD_BEGIN + 5);
  1709.   DBIMOD_OS          = (DBIMOD_BEGIN + 6);
  1710.   DBIMOD_DBASEDRV    = (DBIMOD_BEGIN + 7);
  1711.  
  1712.   DBIMOD_END         = (DBIMOD_BEGIN + 8);
  1713.  
  1714. {----------------------------------------------------------------------------}
  1715.  
  1716.   DBISYM_BEGIN       = (DBIMOD_END + 1);
  1717.  
  1718.   DBISYM_TOKEN       = (DBISYM_BEGIN + ecTOKEN);
  1719.   DBISYM_TABLENAME   = (DBISYM_BEGIN + ecTABLENAME);
  1720.   DBISYM_FIELDNAME   = (DBISYM_BEGIN + ecFIELDNAME);
  1721.   DBISYM_IMAGEROW    = (DBISYM_BEGIN + ecIMAGEROW);
  1722.   DBISYM_USERNAME    = (DBISYM_BEGIN + ecUSERNAME);
  1723.   DBISYM_FILENAME    = (DBISYM_BEGIN + ecFILENAME);
  1724.   DBISYM_INDEXNAME   = (DBISYM_BEGIN + ecINDEXNAME);
  1725.   DBISYM_DIRNAME     = (DBISYM_BEGIN + ecDIRNAME);
  1726.   DBISYM_KEYNAME     = (DBISYM_BEGIN + ecKEYNAME);
  1727.   DBISYM_ALIAS       = (DBISYM_BEGIN + ecALIAS);
  1728.   DBISYM_DRIVENAME   = (DBISYM_BEGIN + ecDRIVENAME);
  1729.   DBISYM_NATIVECODE  = (DBISYM_BEGIN + ecNATIVECODE);
  1730.   DBISYM_NATIVEMSG   = (DBISYM_BEGIN + ecNATIVEMSG);
  1731.   DBISYM_LINENUMBER  = (DBISYM_BEGIN + ecLINENUMBER);
  1732.   DBISYM_CAPABILITY  = (DBISYM_BEGIN + ecCAPABILITY);
  1733.  
  1734.   DBISYM_BASEEND     = (DBISYM_BEGIN + 100);
  1735.  
  1736. {----------------------------------------------------------------------------}
  1737.  
  1738.   DBISYM_MISC        = (DBISYM_BASEEND + 1);
  1739.  
  1740.   DBISYM_WORK        = (DBISYM_MISC + 1);
  1741.   DBISYM_PRIV        = (DBISYM_MISC + 2);
  1742.   DBISYM_COPY        = (DBISYM_MISC + 3);
  1743.   DBISYM_APPEND      = (DBISYM_MISC + 4);
  1744.  
  1745.   DBISYM_END         = (DBIMOD_BEGIN + $3FFF);
  1746.  
  1747.  
  1748. {============================================================================}
  1749. {                      DBI Config symbols                                    }
  1750. {============================================================================}
  1751.  
  1752. { Categories }
  1753.  
  1754.   szCFGSYSTEM        = 'SYSTEM';
  1755.   szCFGDRIVER        = 'DRIVERS';
  1756.   szCFGDATABASE      = 'DATABASES';
  1757.  
  1758. {----------------------------------------------------------------------------}
  1759. { System Fields                                                              }
  1760. {----------------------------------------------------------------------------}
  1761.  
  1762.   szCFGSYSVERSION    = 'VERSION';
  1763.   szCFGSYSNETTYPE    = 'NET TYPE';
  1764.   szCFGSYSNETDIR     = 'NET DIR';
  1765.   szCFGSYSLOCALSHARE = 'LOCAL SHARE';
  1766.   szCFGSYSLANGDRV    = 'LANGDRIVER';
  1767.   szCFGSYSLANGDRVDIR = 'LANGDRVDIR';
  1768.   szCFGSYSMINBUF     = 'MINBUFSIZE';
  1769.   szCFGSYSMAXBUF     = 'MAXBUFSIZE';
  1770.   szCFGSYSLOCKRETRY  = 'LOCKRETRY';
  1771.   szCFGSYSFLAGS      = 'SYSFLAGS';
  1772.   szCFGMAXFILEHANDLES = 'MAXFILEHANDLES';
  1773.   szCFGSQLQRYMODE    = 'SQLQRYMODE';
  1774.   szCFGLOWMEMLIMIT   = 'LOW MEMORY USAGE LIMIT'; { Use this instead of NOLOWMEMBUF }
  1775.   szCFGSYSODBCCFGIMPORT = 'AUTO ODBC';
  1776.  
  1777. {----------------------------------------------------------------------------}
  1778. { Driver Fields                                                              }
  1779. {----------------------------------------------------------------------------}
  1780.  
  1781.   szCFGDRVVERSION    = 'VERSION';
  1782.   szCFGDRVTYPE       = 'TYPE';
  1783.   szCFGDRVDLL        = 'DLL';
  1784.   szCFGDRVFLAGS      = 'DRIVER FLAGS';
  1785.   szCFGDRVLANGDRIVER = 'LANGDRIVER';
  1786.   szCFGDRVFILLFACTOR = 'FILL FACTOR';
  1787.   szCFGDRVBLOCKSIZE  = 'BLOCK SIZE';
  1788.   szCFGDRVLOCKPROTOCOL = 'LOCKPROTOCOL';
  1789.   szCFGDRVLEVEL      = 'LEVEL';
  1790.   szCFGDRVVENDINIT   = 'VENDOR INIT';
  1791.  
  1792. {----------------------------------------------------------------------------}
  1793. { Dbase Driver fields                                                        }
  1794. {----------------------------------------------------------------------------}
  1795.  
  1796.   szCFGDRVMEMOBLOCKSIZE = 'MEMO FILE BLOCK SIZE';
  1797.   szCFGDRVMDXBLOCKSIZE = 'MDX BLOCK SIZE';
  1798.  
  1799.  
  1800. {----------------------------------------------------------------------------}
  1801. { Driver Nodes                                                               }
  1802. {----------------------------------------------------------------------------}
  1803.  
  1804.   szCFGDRVINIT       = 'INIT';
  1805.   szCFGDBCREATE      = 'DB CREATE';
  1806.   szCFGDBOPEN        = 'DB OPEN';
  1807.   szCFGTBLCREATE     = 'TABLE CREATE';
  1808.   szCFGTBLOPEN       = 'TABLE OPEN';
  1809.  
  1810. {----------------------------------------------------------------------------}
  1811. { Database Nodes                                                             }
  1812. {----------------------------------------------------------------------------}
  1813.  
  1814.   szCFGDBINFO        = 'DB INFO';
  1815.  
  1816. {----------------------------------------------------------------------------}
  1817. { Database fields                                                            }
  1818. {----------------------------------------------------------------------------}
  1819.  
  1820.   szCFGDBTYPE        = 'TYPE';
  1821.   szCFGDBPATH        = 'PATH';
  1822.   szCFGDBDEFAULTDRIVER = 'DEFAULT DRIVER';
  1823.  
  1824. {----------------------------------------------------------------------------}
  1825. { Others                                                                     }
  1826. {----------------------------------------------------------------------------}
  1827.  
  1828.   szCFGINIT          = 'INIT';
  1829.   szTYPE             = 'TYPE';
  1830.   szCFGDBSTANDARD    = 'STANDARD';
  1831.   szCFGTRUE          = 'TRUE';
  1832.   szCFGFALSE         = 'FALSE';
  1833.   szOPENMODE         = 'OPEN MODE';
  1834.   szREADWRITE        = 'READ/WRITE';
  1835.   szREADONLY         = 'READ ONLY';
  1836.   szSHAREMODE        = 'SHARE MODE';
  1837.   szEXCLUSIVE        = 'EXCLUSIVE';
  1838.   szSHARED           = 'SHARED';
  1839.   szUSERNAME         = 'USER NAME';
  1840.   szSERVERNAME       = 'SERVER NAME';
  1841.   szDATABASENAME     = 'DATABASE NAME';
  1842.   szSCHEMASIZE       = 'SCHEMA CACHE SIZE';
  1843.   szCFGSTRICTINTEGRITY = 'STRICTINTEGRTY';
  1844.   szSQLPASSMODE      = 'SQLPASSTHRU MODE';
  1845.   szNOTSHARED        = 'NOT SHARED';
  1846.   szSHAREDAUTOCOMMIT = 'SHARED AUTOCOMMIT';
  1847.   szSHAREDNOAUTOCOMMIT = 'SHARED NOAUTOCOMMIT';
  1848.   szSCHEMATIME       = 'SCHEMA CACHE TIME';
  1849.   szMAXQUERYTIME     = 'MAX QUERY TIME';
  1850.  
  1851.  
  1852. {----------------------------------------------------------------------------}
  1853. { SYSTEM DATE/TIME/NUMBER FORMATS                                            }
  1854. { SYSTEM nodes:                                                              }
  1855. {----------------------------------------------------------------------------}
  1856.   szCFGFORMAT        = 'FORMATS';
  1857.  
  1858. {----------------------------------------------------------------------------}
  1859. { Format nodes:                                                              }
  1860. {----------------------------------------------------------------------------}
  1861.   szCFGDATE          = 'DATE';
  1862.   szCFGTIME          = 'TIME';
  1863.   szCFGNUMBER        = 'NUMBER';
  1864.  
  1865. {----------------------------------------------------------------------------}
  1866. { DATE and/or TIME fields:                                                   }
  1867. {----------------------------------------------------------------------------}
  1868.   szCFGSEPARATOR     = 'SEPARATOR';
  1869.   szCFGMODE          = 'MODE';
  1870.   szCFGFOURDIGITYEAR = 'FOURDIGITYEAR';
  1871.   szCFGYEARBIASED    = 'YEARBIASED';
  1872.   szCFGLEADINGZEROM  = 'LEADINGZEROM';
  1873.   szCFGLEADINGZEROD  = 'LEADINGZEROD';
  1874.   szCFGTWELVEHOUR    = 'TWELVEHOUR';
  1875.   szCFGAMSTRING      = 'AMSTRING';
  1876.   szCFGPMSTRING      = 'PMSTRING';
  1877.   szCFGSECONDS       = 'SECONDS';
  1878.   szCFGMILSECONDS    = 'MILSECONDS';
  1879.  
  1880. {----------------------------------------------------------------------------}
  1881. { Number fields:                                                             }
  1882. {----------------------------------------------------------------------------}
  1883.   szCFGDECIMALSEPARATOR = 'DECIMALSEPARATOR';
  1884.   szCFGTHOUSANDSEPARATOR = 'THOUSANDSEPARATOR';
  1885.   szCFGDECIMALDIGITS = 'DECIMALDIGITS';
  1886.   szCFGLEADINGZERON  = 'LEADINGZERON';
  1887.  
  1888. { String resoure id's for each string listed above }
  1889.  
  1890.   DBICFG_BASE        = $3A00;
  1891.  
  1892. {----------------------------------------------------------------------------}
  1893. { Categories                                                                 }
  1894. {----------------------------------------------------------------------------}
  1895.   iCFGSYSTEM         = (DBICFG_BASE + 1);
  1896.   iCFGDRIVER         = (DBICFG_BASE + 2);
  1897.   iCFGDATABASE       = (DBICFG_BASE + 3);
  1898.  
  1899. {----------------------------------------------------------------------------}
  1900. { System Fields                                                              }
  1901. {----------------------------------------------------------------------------}
  1902.   iCFGSYSVERSION     = (DBICFG_BASE + 5);
  1903.   iCFGSYSNETTYPE     = (DBICFG_BASE + 6);
  1904.   iCFGSYSNETDIR      = (DBICFG_BASE + 7);
  1905.   iCFGSYSLOCALSHARE  = (DBICFG_BASE + 8);
  1906.   iCFGSYSLANGDRV     = (DBICFG_BASE + 9);
  1907.   iCFGSYSLANGDRVDIR  = (DBICFG_BASE + 10);
  1908.   iCFGSYSMINBUF      = (DBICFG_BASE + 11);
  1909.   iCFGSYSMAXBUF      = (DBICFG_BASE + 12);
  1910.   iCFGSYSLOCKRETRY   = (DBICFG_BASE + 13);
  1911.   iCFGSYSFLAGS       = (DBICFG_BASE + 14);
  1912.   iCFGMAXFILEHANDLES = (DBICFG_BASE + 15);
  1913.   iCFGSQLQRYMODE     = (DBICFG_BASE + 16);
  1914.   iCFGLOWMEMLIMIT    = (DBICFG_BASE + 17);
  1915.   iCFGSYSODBCCFGIMPORT=(DBICFG_BASE + 18);
  1916.  
  1917.  
  1918. {----------------------------------------------------------------------------}
  1919. { Driver Fields                                                              }
  1920. {----------------------------------------------------------------------------}
  1921.   iCFGDRVVERSION     = (DBICFG_BASE + 20);
  1922.   iCFGDRVTYPE        = (DBICFG_BASE + 21);
  1923.   iCFGDRVLANGDRIVER  = (DBICFG_BASE + 22);
  1924.   iCFGDRVFILLFACTOR  = (DBICFG_BASE + 23);
  1925.   iCFGDRVBLOCKSIZE   = (DBICFG_BASE + 24);
  1926.   iCFGDRVLOCKPROTOCOL = (DBICFG_BASE + 25);
  1927.   iCFGDRVLEVEL       = (DBICFG_BASE + 26);
  1928.   iCFGDRVFLAGS       = (DBICFG_BASE + 27);
  1929.  
  1930. {----------------------------------------------------------------------------}
  1931. { Dbase Driver fields                                                        }
  1932. {----------------------------------------------------------------------------}
  1933.   iCFGDRVMEMOBLOCKSIZE = (DBICFG_BASE + 30 );
  1934.   iCFGDRVMDXBLOCKSIZE = (DBICFG_BASE + 31 );
  1935.  
  1936.  
  1937.  
  1938. {----------------------------------------------------------------------------}
  1939. { Driver Nodes                                                               }
  1940. {----------------------------------------------------------------------------}
  1941.   iCFGDRVINIT        = (DBICFG_BASE + 40 );
  1942.   iCFGDBCREATE       = (DBICFG_BASE + 41 );
  1943.   iCFGDBOPEN         = (DBICFG_BASE + 42 );
  1944.   iCFGTBLCREATE      = (DBICFG_BASE + 43 );
  1945.   iCFGTBLOPEN        = (DBICFG_BASE + 44 );
  1946.  
  1947. {----------------------------------------------------------------------------}
  1948. { Database Nodes                                                             }
  1949. {----------------------------------------------------------------------------}
  1950.   iCFGDBINFO         = (DBICFG_BASE + 50 );
  1951.  
  1952. {----------------------------------------------------------------------------}
  1953. { Database fields                                                            }
  1954. {----------------------------------------------------------------------------}
  1955.   iCFGDBTYPE         = (DBICFG_BASE + 60);
  1956.   iCFGDBPATH         = (DBICFG_BASE + 61);
  1957.   iCFGDBDEFAULTDRIVER= (DBICFG_BASE + 62);
  1958.  
  1959. {----------------------------------------------------------------------------}
  1960. { Others                                                                     }
  1961. {----------------------------------------------------------------------------}
  1962.   iCFGINIT           = (DBICFG_BASE + 70);
  1963.   iTYPE              = (DBICFG_BASE + 71);
  1964.   iCFGDBSTANDARD     = (DBICFG_BASE + 72);
  1965.   iCFGTRUE           = (DBICFG_BASE + 73);
  1966.   iCFGFALSE          = (DBICFG_BASE + 74);
  1967.   iOPENMODE          = (DBICFG_BASE + 75);
  1968.   iREADWRITE         = (DBICFG_BASE + 76);
  1969.   iREADONLY          = (DBICFG_BASE + 77);
  1970.   iSHAREMODE         = (DBICFG_BASE + 78);
  1971.   iEXCLUSIVE         = (DBICFG_BASE + 79);
  1972.   iSHARED            = (DBICFG_BASE + 80);
  1973.   iUSERNAME          = (DBICFG_BASE + 81);
  1974.   iSERVERNAME        = (DBICFG_BASE + 82);
  1975.   iDATABASENAME      = (DBICFG_BASE + 83);
  1976.   iSCHEMASIZE        = (DBICFG_BASE + 84);
  1977.   iCFGSTRICTINTEGRITY = (DBICFG_BASE + 85);
  1978.  
  1979. {----------------------------------------------------------------------------}
  1980. { System node:                                                               }
  1981. {----------------------------------------------------------------------------}
  1982.   iCFGFORMAT         = (DBICFG_BASE + 130);
  1983.  
  1984. {----------------------------------------------------------------------------}
  1985. { Format nodes:                                                              }
  1986. {----------------------------------------------------------------------------}
  1987.   iCFGDATE           = (DBICFG_BASE + 131);
  1988.   iCFGTIME           = (DBICFG_BASE + 132);
  1989.   iCFGNUMBER         = (DBICFG_BASE + 133);
  1990.  
  1991. {----------------------------------------------------------------------------}
  1992. { DATE and/or TIME fields:                                                   }
  1993. {----------------------------------------------------------------------------}
  1994.   iCFGSEPARATOR      = (DBICFG_BASE + 140);
  1995.   iCFGMODE           = (DBICFG_BASE + 141);
  1996.   iCFGFOURDIGITYEAR  = (DBICFG_BASE + 142);
  1997.   iCFGYEARBIASED     = (DBICFG_BASE + 143);
  1998.   iCFGLEADINGZEROM   = (DBICFG_BASE + 144);
  1999.   iCFGLEADINGZEROD   = (DBICFG_BASE + 145);
  2000.   iCFGTWELVEHOUR     = (DBICFG_BASE + 146);
  2001.   iCFGAMSTRING       = (DBICFG_BASE + 147);
  2002.   iCFGPMSTRING       = (DBICFG_BASE + 148);
  2003.   iCFGSECONDS        = (DBICFG_BASE + 149);
  2004.   iCFGMILSECONDS     = (DBICFG_BASE + 150);
  2005.  
  2006. {----------------------------------------------------------------------------}
  2007. { Number fields:                                                             }
  2008. {----------------------------------------------------------------------------}
  2009.   iCFGDECIMALSEPARATOR = (DBICFG_BASE + 160);
  2010.   iCFGTHOUSANDSEPARATOR = (DBICFG_BASE + 161);
  2011.   iCFGDECIMALDIGITS  = (DBICFG_BASE + 162);
  2012.   iCFGLEADINGZERON   = (DBICFG_BASE + 163);
  2013.  
  2014.   iCFGDEFLANGDRV     = (DBICFG_BASE + 165);
  2015.   iCFGDBASEDEFLANGDRV = (DBICFG_BASE + 166);
  2016.  
  2017. {----------------------------------------------------------------------------}
  2018. { Formats                                                                    }
  2019. {----------------------------------------------------------------------------}
  2020.   iCFGDEFSEPARATOR   = (DBICFG_BASE + 170);
  2021.   iCFGDEFMODE        = (DBICFG_BASE + 171);
  2022.   iCFGDEFFOURDIGITYEAR = (DBICFG_BASE + 172);
  2023.   iCFGDEFYEARBIASED  = (DBICFG_BASE + 173);
  2024.   iCFGDEFLEADINGZEROM = (DBICFG_BASE + 174);
  2025.   iCFGDEFLEADINGZEROD = (DBICFG_BASE + 175);
  2026.   iCFGDEFTWELVEHOUR  = (DBICFG_BASE + 176);
  2027.   iCFGDEFAMSTRING    = (DBICFG_BASE + 177);
  2028.   iCFGDEFPMSTRING    = (DBICFG_BASE + 178);
  2029.   iCFGDEFSECONDS     = (DBICFG_BASE + 179);
  2030.   iCFGDEFMILSECONDS  = (DBICFG_BASE + 180);
  2031.   iCFGDEFDECIMALSEPARATOR = (DBICFG_BASE + 181);
  2032.   iCFGDEFTHOUSANDSEPARATOR = (DBICFG_BASE + 182);
  2033.   iCFGDEFLEADINGZERO = (DBICFG_BASE + 183);
  2034.  
  2035. implementation
  2036.