home *** CD-ROM | disk | FTP | other *** search
/ DOS/V Power Report 1997 May / VPR9705A.ISO / VPR_DATA / PROGRAM / CBTRIAL / SETUP / DATA.Z / IDAPI.H < prev    next >
C/C++ Source or Header  |  1997-02-14  |  270KB  |  5,659 lines

  1.  
  2. //              idapi.h - main include file for idapi clients
  3. //
  4. // $Revision:   4.128.1.7  $
  5.  
  6.  
  7. #ifndef DBI_H
  8. #define DBI_H
  9. #ifdef __cplusplus
  10.     extern "C" {
  11. #endif // __cplusplus
  12.  
  13.  
  14. #define DBIINTFVER         300                  // Version of the interface
  15. #define DBIENGVERSION      300                  // Version of the engine (3.00)
  16.  
  17.  
  18. // assume byte packing throughout
  19. #if ! (defined(lint) || defined(_lint))
  20. #  ifndef RC_INVOKED
  21. #    if ( _MSC_VER >= 800 ) || (defined(__BORLANDC__) && defined(__FLAT__))
  22. #      pragma warning(disable:4103)
  23. #      if !(defined( MIDL_PASS )) || defined( __midl )
  24. #        pragma pack(push)
  25. #      endif
  26. #      pragma pack(1)
  27. #    elif defined(__BORLANDC__) && !defined(__FLAT__)
  28. #      pragma option -a-
  29. #    else
  30. #      pragma pack(1)
  31. #    endif
  32. #  endif // ndef RC_INVOKED
  33. #endif // ! (defined(lint) || defined(_lint))
  34.  
  35. #ifndef NODBITYPES
  36.  
  37. //-----------------------------------------------------------------------
  38. //     DBI types
  39. //-----------------------------------------------------------------------
  40.  
  41.  
  42. // sdk debug layer defines
  43. #define         DEBUGON         0x1
  44. #define         OUTPUTTOFILE    0x2
  45. #define         FLUSHEVERYOP    0x8
  46. #define         APPENDTOLOG     0x10
  47.  
  48.  
  49.  
  50.  
  51. // Constants
  52.  
  53. #define DBIMAXNAMELEN         31            // Name limit (table, field etc)
  54. #define DBIMAXSPNAMELEN       64            // Max stored procedure name length
  55. #define DBIMAXFUNCNAMELEN     255           // Max function name len
  56. #define DBIMAXFLDSINKEY       16            // Max fields in a key
  57. #define DBIMAXKEYEXPLEN      220            // Max Key expression length
  58. #define DBIMAXEXTLEN           3            // Max file extension len, not incl. dot (excluding zero termination)
  59. #if defined(__WIN32__)
  60. #define DBIMAXTBLNAMELEN     260            // Max table name length
  61. #define DBIMAXDRIVELEN       127            // Max drive length
  62. #define DBIMAXPATHLEN        260            // Max path+file name len (excluding zero termination)
  63. #else
  64. #define DBIMAXTBLNAMELEN     127            // Max table name length
  65. #define DBIMAXDRIVELEN         2            // Max drive length
  66. #define DBIMAXPATHLEN         81            // Max path+file name len (excluding zero termination)
  67. #endif // defined(WIN32)
  68.  
  69. #define DBIMAXMSGLEN         127            // Max message len
  70. #define DBIMAXVCHKLEN        255            // Max val check len
  71. #define DBIMAXPICTLEN        175            // Max picture len
  72. #define DBIMAXFLDSINSEC      256            // Max fields in security spec
  73.  
  74. #define DBIMAXSCFIELDS        32            // max nbr of fields in a config section
  75. #define DBIMAXSCFLDLEN       128            // max field length
  76. #define DBIMAXSCRECSIZE     DBIMAXSCFIELDS*DBIMAXSCFLDLEN  // max rec size
  77.  
  78. #define DBIMAXUSERNAMELEN      14           // Max user name (general)
  79. #define DBIMAXXBUSERNAMELEN    16           // Max user name length (xBASE)
  80. #define DBIMAXBOOKMARKLEN    4104           // Max Bookmark length
  81.  
  82. #define DBIMAXTRACELEN       8192           // Max trace msg len
  83.  
  84. #define DBIMAXTYPEDESC       127            // Max Type Description size
  85. #define DBIMAXDRSQLSTR       8192           // Max Size of SQL Constraint
  86.  
  87.  
  88. #if defined(__FLAT__)
  89. #ifdef far
  90. #undef far
  91. #endif // far
  92. #define far
  93. #endif // defined __FLAT__
  94.  
  95. #ifndef NODBIBASETYPES
  96.  
  97. #ifndef TRUE
  98. #  define TRUE 1
  99. #endif // TRUE
  100. #ifndef FALSE
  101. #  define FALSE 0
  102. #endif // FALSE
  103.  
  104. //For pointers
  105. #ifndef NULL
  106. #  define NULL (0)
  107. #endif // NULL
  108.  
  109. #if defined(__WIN32__) || defined (__NT__)
  110.    #if !defined(VOID)
  111.        #define VOID    void
  112.        typedef char CHAR;                     // from winnt.h
  113.        typedef short SHORT;
  114.        typedef long LONG;
  115.    #endif
  116. #else
  117.    #if !defined(VOID)
  118.       #define VOID    void
  119.    #endif // !defined(VOID)
  120.    typedef char CHAR;                     // from windows.h
  121. #endif // defined(WIN32) && !defined(VOID)
  122.  
  123. #ifndef _WINDEF_
  124. typedef unsigned char       BYTE;
  125. #endif
  126.  
  127. #ifndef INT8
  128. #  define INT8    char
  129. #endif // INT8
  130.  
  131. #ifndef UINT8
  132. #  define UINT8   unsigned char
  133. #endif // UINT8
  134.  
  135. #ifndef INT16
  136. #if defined(__FLAT__)
  137. #  define INT16   short
  138. #else
  139. #  define INT16   int
  140. #endif // defined(__FLAT__)
  141. #endif // INT16
  142.  
  143. #ifndef UINT16
  144. #if defined(__FLAT__)
  145. #  define UINT16  unsigned short
  146. #else
  147. #  define UINT16  unsigned int
  148. #endif // defined(__FLAT__)
  149. #endif // UINT16
  150.  
  151. #ifndef INT32
  152. #  define INT32   long
  153. #endif // INT32
  154. #ifndef UINT32
  155. #  define UINT32  unsigned long
  156. #endif // UINT32
  157.  
  158. #ifndef BOOL
  159. typedef int BOOL;                      // from windows.h
  160. #endif
  161.  
  162. typedef unsigned char BOOL8;
  163. typedef short         BOOL16;
  164.  
  165. #endif // NODBIBASETYPES
  166.  
  167. typedef double              DFLOAT;
  168.  
  169. typedef long      DBIDATE;
  170. typedef long      TIME;
  171. typedef double    TIMESTAMP;
  172.  
  173. typedef UINT32    hDBICfg;
  174.  
  175. typedef VOID      far *pVOID;
  176. typedef pVOID     far *ppVOID;
  177. typedef CHAR      far *pCHAR;
  178. typedef const CHAR far *pCCHAR;
  179. typedef BYTE      far *pBYTE;
  180. typedef INT8      far *pINT8;
  181. typedef UINT8     far *pUINT8;
  182. typedef INT16     far *pINT16;
  183. typedef UINT16    far *pUINT16;
  184. typedef INT32     far *pINT32;
  185. typedef UINT32    far *pUINT32;
  186. typedef DFLOAT    far *pDFLOAT;
  187. typedef DBIDATE   far *pDBIDATE;
  188. typedef TIME      far *pTIME;
  189. typedef BOOL      far *pBOOL;
  190. typedef BOOL16    far *pBOOL16;
  191. typedef TIMESTAMP far *pTIMESTAMP;
  192.  
  193. #if !defined(__WIN32__) || (defined(__WATCOMC__) && !defined (__NT__))
  194. #define FLOAT     DFLOAT            // for compatibility with BDE 2.0
  195. #define pFLOAT    pDFLOAT
  196. #define DATE      DBIDATE
  197. #define pDATE     pDBIDATE
  198. #endif // WIN32
  199.  
  200. typedef pBYTE     far *ppBYTE;
  201. typedef pCHAR     far *ppCHAR;
  202. typedef pBOOL     far *ppBOOL;
  203. typedef pBOOL16   far *ppBOOL16;
  204.  
  205. typedef hDBICfg   far *phDBICfg;
  206.  
  207.  
  208. // Constants
  209.  
  210. //===========================================================================
  211. //                            G e n e r a l
  212. //===========================================================================
  213.  
  214. #if defined(__FLAT__)
  215. #define DBIFN  __stdcall               // All functions are this type
  216. #else
  217. #define DBIFN  __pascal far            // All functions are this type
  218. #endif // define(__FLAT__)
  219. typedef UINT16          DBIResult;     // Function result
  220. typedef DBIResult  far *pDBIResult;    // Function result pointer
  221.  
  222. typedef UINT32           hDBIObj;      // Generic object handle
  223.  
  224. typedef hDBIObj          hDBIDb;       // Database handle
  225. typedef hDBIObj          hDBIQry;      // Query handle
  226. typedef hDBIObj          hDBIStmt;     // Statement handle ("new query")
  227. typedef hDBIObj          hDBICur;      // Cursor handle
  228. typedef hDBIObj          hDBISes;      // Session handle
  229. typedef hDBIObj          hDBIXlt;      // Translation handle
  230.  
  231. typedef hDBIObj    far *phDBIObj;      // pointer to generic object handle
  232. typedef hDBIDb     far *phDBIDb;       // pointer to Database  handle
  233. typedef hDBIQry    far *phDBIQry;      // pointer to Query     handle
  234. typedef hDBIStmt   far *phDBIStmt;     // pointer to Statement handle
  235. typedef hDBICur    far *phDBICur;      // pointer to Cursor    handle
  236. typedef hDBISes    far *phDBISes;      // pointer to Session   handle
  237. typedef hDBIXlt    far *phDBIXlt;      // pointer to Translation handle
  238.  
  239. typedef UINT32          hDBIXact;      // Transaction handle
  240. typedef hDBIXact   far *phDBIXact;     // pointer to Transaction handle
  241.  
  242. typedef hDBIObj         hDBIDR ;       // Handle to a Client Data Repository (CDR) Object
  243. typedef hDBIDR     far  *phDBIDR ;     // Ptr to CDR Handle
  244.  
  245. // typedefs for buffers of various common sizes:
  246. //
  247. typedef CHAR   DBIPATH    [DBIMAXPATHLEN+1];     // holds a DOS path
  248. typedef CHAR   DBINAME    [DBIMAXNAMELEN+1];     // holds a name
  249. typedef CHAR   DBIEXT     [DBIMAXEXTLEN+1];      // holds an extension EXT
  250. typedef CHAR   DBIDOTEXT  [DBIMAXEXTLEN+2];      // holds an extension EXT including '.'
  251. typedef CHAR   DBIDRIVE   [DBIMAXDRIVELEN+1];    // holds a drive name
  252. typedef CHAR   DBITBLNAME [DBIMAXTBLNAMELEN+1];  // holds a table name
  253. typedef CHAR   DBISPNAME  [DBIMAXSPNAMELEN+1];   // holds a stored procedure name
  254. typedef CHAR   DBIUSERNAME[DBIMAXUSERNAMELEN+1]; // holds a user name
  255. typedef UINT16 DBIKEY     [DBIMAXFLDSINKEY];     // holds list of fields in a key
  256. typedef CHAR   DBIKEYEXP  [DBIMAXKEYEXPLEN+1];   // holds a key expression
  257. typedef BYTE   DBIVCHK    [DBIMAXVCHKLEN+1];     // holds a validity check
  258. typedef CHAR   DBIPICT    [DBIMAXPICTLEN+1];     // holds a picture (Pdox)
  259. typedef CHAR   DBIMSG     [DBIMAXMSGLEN+1];      // holds an error message
  260. typedef CHAR   DBIDRTYPEDESC [DBIMAXTYPEDESC+1]; // holds a Type Description string
  261. typedef CHAR   DBISQLSTR   [DBIMAXDRSQLSTR+1];    // a SQL string
  262.  
  263.  
  264. //===========================================================================
  265. //                            Environmental
  266. //===========================================================================
  267.  
  268. typedef struct                            // Struct for defining the environ.
  269.    {
  270.       DBIPATH        szWorkDir;                 // Working directory
  271.       DBIPATH        szIniFile;                 // Configuration file
  272.       BOOL16         bForceLocalInit;           // Force local initialization
  273.       DBINAME        szLang;                    // System language driver
  274.       DBINAME        szClientName;              // Client name (documentary)
  275.    } DBIEnv;
  276. typedef DBIEnv far   *pDBIEnv;
  277.  
  278. //============================================================================
  279. //                   System Info
  280. //============================================================================
  281.  
  282. typedef struct                         // System Version Info
  283.    {
  284.       UINT16         iVersion;            // Engine version
  285.       UINT16         iIntfLevel;          // Client Interface level
  286.       DBIDATE        dateVer;             // Version date (Compile/Release)
  287.       TIME           timeVer;             // Version time (Compile/Release)
  288. #if defined(__WIN32__)
  289.       CHAR           szVersion[20];       // Version name (xxx.xxx.xxx.xxx)
  290. #endif
  291.    } SYSVersion;
  292. typedef SYSVersion far *pSYSVersion;
  293.  
  294. typedef struct                         // System configuration (basic)
  295.    {
  296.       BOOL16         bLocalShare;         // If Local files will be shared
  297.       UINT16         iNetProtocol;        // Net Protocol (35, 40 etc.)
  298.       BOOL16         bNetShare;           // If Net files will be shared
  299.       DBINAME        szNetType;           // Network type
  300.       DBIUSERNAME    szUserName;          // Network user name
  301.       DBIPATH        szIniFile;           // Configuration file
  302.       DBINAME        szLangDriver;        // System language driver
  303.    } SYSConfig;
  304. typedef SYSConfig far *pSYSConfig;
  305.  
  306. typedef struct                         // System Status/Info
  307.    {
  308.       UINT16         iBufferSpace;           // in K
  309.       UINT16         iHeapSpace;             // in K
  310.       UINT16         iDrivers;               // Active/Loaded drivers
  311.       UINT16         iClients;               // Active clients
  312.       UINT16         iSessions;              // Number of sessions (For all clients)
  313.       UINT16         iDatabases;             // Open databases
  314.       UINT16         iCursors;               // Number of cursors
  315.    } SYSInfo;
  316. typedef SYSInfo far * pSYSInfo;
  317.  
  318. typedef struct
  319.    {
  320.       DBINAME        szName;                 // Documentary name
  321.       UINT16         iSessions;              // Number of sessions
  322.       DBIPATH        szWorkDir;              // Working directory
  323.       DBINAME        szLang;                 // System language driver (Client supplied)
  324.    } CLIENTInfo;
  325. typedef CLIENTInfo far * pCLIENTInfo;
  326.  
  327. typedef struct
  328.    {
  329.       UINT16         iSession;               // Session id (1..n)
  330.       DBINAME        szName;                 // Documentary name
  331.       UINT16         iDatabases;             // Open databases
  332.       UINT16         iCursors;               // Open cursors
  333.       INT16          iLockWait;              // Lock wait time (in seconds)
  334.       DBIPATH        szNetDir;               // Net directory location
  335.       DBIPATH        szPrivDir;              // Current Private directory
  336.    } SESInfo;
  337. typedef SESInfo far * pSESInfo;
  338.  
  339. //============================================================================
  340. //                             Table / Field Types
  341. //============================================================================
  342.  
  343. // Driver Types
  344.  
  345. #define szPARADOX       "PARADOX"
  346. #define szDBASE         "DBASE"
  347. #define szASCII         "ASCIIDRV"
  348.  
  349.  
  350. // Field Types (Logical)
  351.  
  352. #define fldUNKNOWN      0
  353. #define fldZSTRING      1                 // Null terminated string
  354. #define fldDATE         2                 // Date     (32 bit)
  355. #define fldBLOB         3                 // Blob
  356. #define fldBOOL         4                 // Boolean  (16 bit)
  357. #define fldINT16        5                 // 16 bit signed number
  358. #define fldINT32        6                 // 32 bit signed number
  359. #define fldFLOAT        7                 // 64 bit floating point
  360. #define fldBCD          8                 // BCD
  361. #define fldBYTES        9                 // Fixed number of bytes
  362. #define fldTIME         10                // Time        (32 bit)
  363. #define fldTIMESTAMP    11                // Time-stamp  (64 bit)
  364. #define fldUINT16       12                // Unsigned 16 bit integer
  365. #define fldUINT32       13                // Unsigned 32 bit integer
  366. #define fldFLOATIEEE    14                // 80-bit IEEE float
  367. #define fldVARBYTES     15                // Length prefixed var bytes
  368. #define fldLOCKINFO     16                // Look for LOCKINFO typedef
  369.  
  370. #define MAXLOGFLDTYPES  17                // Number of logical fieldtypes
  371.  
  372. // Sub Types (Logical)
  373.  
  374. // fldFLOAT subtype
  375.  
  376. #define fldstMONEY      21                // Money
  377.  
  378. // fldBLOB subtypes
  379.  
  380. #define fldstMEMO          22             // Text Memo
  381. #define fldstBINARY        23             // Binary data
  382. #define fldstFMTMEMO       24             // Formatted Text
  383. #define fldstOLEOBJ        25             // OLE object (Paradox)
  384. #define fldstGRAPHIC       26             // Graphics object
  385. #define fldstDBSOLEOBJ     27             // dBASE OLE object
  386. #define fldstTYPEDBINARY   28             // Typed Binary data
  387.  
  388. // fldZSTRING subtype
  389.  
  390. #define fldstPASSWORD      1              // Password
  391.  
  392. // fldINT32 subtype
  393.  
  394. #define  fldstAUTOINC      29
  395.  
  396. // Paradox types (Physical)
  397.  
  398. #define  fldPDXCHAR        0x101        // Alpha    (string)
  399. #define  fldPDXNUM         0x102        // Numeric
  400. #define  fldPDXMONEY       0x103        // Money
  401. #define  fldPDXDATE        0x104        // Date
  402. #define  fldPDXSHORT       0x105        // Short
  403. #define  fldPDXMEMO        0x106        // Text Memo       (blob)
  404. #define  fldPDXBINARYBLOB  0x107        // Binary data     (blob)
  405. #define  fldPDXFMTMEMO     0x108        // Formatted text  (blob)
  406. #define  fldPDXOLEBLOB     0x109        // OLE object      (blob)
  407. #define  fldPDXGRAPHIC     0x10A        // Graphics object (blob)
  408. #define  fldPDXBLOB        fldPDXMEMO
  409. #define  fldPDXLONG        0x10B        // Long
  410. #define  fldPDXTIME        0x10C        // Time
  411. #define  fldPDXDATETIME    0x10D        // Time Stamp
  412. #define  fldPDXBOOL        0x10E        // Logical
  413. #define  fldPDXAUTOINC     0x10F        // Auto increment (long)
  414. #define  fldPDXBYTES       0x110        // Fixed number of bytes
  415. #define  fldPDXBCD         0x111        // BCD (32 digits)
  416. #define  fldPDXUNICHAR     0x112        // not supported yet
  417.  
  418. // xBASE types (Physical)
  419.  
  420. #define  fldDBCHAR         0x201        // Char string
  421. #define  fldDBNUM          0x202        // Number
  422. #define  fldDBMEMO         0x203        // Memo          (blob)
  423. #define  fldDBBOOL         0x204        // Logical
  424. #define  fldDBDATE         0x205        // Date
  425. #define  fldDBFLOAT        0x206        // Float
  426. #define  fldDBLOCK         0x207        // Logical type is LOCKINFO
  427. #define  fldDBOLEBLOB      0x208        // OLE object    (blob)
  428. #define  fldDBBINARY       0x209        // Binary data   (blob)
  429. #define  fldDBBYTES        0x20A        // Only for TEMPORARY tables
  430.  
  431. // xBASE key types (Cannot be used as field types)
  432.  
  433. #define  fldDBKEYNUM       0x210
  434. #define  fldDBKEYBCD       0x211
  435.  
  436.  
  437. // Ascii types (Physical)
  438.  
  439. #define  fldASCCHAR         0x301       // Char string
  440. #define  fldASCNUM          0x302       // Number
  441. #define  fldASCBOOL         0x303       // Logical
  442. #define  fldASCDATE         0x304       // Date
  443. #define  fldASCFLOAT        0x305       // Float
  444. #define  fldASCLOCK         0x306       // Not used
  445. #define  fldASCTIMESTAMP    0x307       // TimeStamp
  446. #define  fldASCTIME         0x308       // Time
  447. #define  fldASCLONG         0x309       // Long
  448. #define  fldASCMONEY        0x30A       // Money
  449.  
  450.  
  451. //============================================================================
  452. //                    Field descriptor
  453. //============================================================================
  454.  
  455.  
  456. typedef enum                              // Field Val Check type
  457.    {
  458.       fldvNOCHECKS     = 0,                  // Does not have explicit val checks
  459.       fldvHASCHECKS    = 1,                  // One or more val checks on the field
  460.       fldvUNKNOWN      = 2                   // Dont know at this time
  461.    } FLDVchk;
  462.  
  463. typedef enum                              // Field Rights
  464.    {
  465.       fldrREADWRITE     = 0,                 // Field can be Read/Written
  466.       fldrREADONLY      = 1,                 // Field is Read only
  467.       fldrNONE          = 2,                 // No Rights on this field
  468.       fldrUNKNOWN       = 3                  // Dont know at this time
  469.    } FLDRights;
  470.  
  471. typedef struct {                          // Field Descriptor
  472.       UINT16         iFldNum;                // Field number (1..n)
  473.       DBINAME        szName;                 // Field name
  474.       UINT16         iFldType;               // Field type
  475.       UINT16         iSubType;               // Field subtype (if applicable)
  476.       INT16          iUnits1;                // Number of Chars, digits etc
  477.       INT16          iUnits2;                // Decimal places etc.
  478.       UINT16         iOffset;                // Offset in the record (computed)
  479.       UINT16         iLen;                   // Length in bytes (computed)
  480.       UINT16         iNullOffset;            // For Null bits (computed)
  481.       FLDVchk        efldvVchk;              // Field Has vcheck (computed)
  482.       FLDRights      efldrRights;            // Field Rights (computed)
  483.       BOOL16         bCalcField;             // Is Calculated field (computed)
  484.       UINT16         iUnUsed[2];
  485.    } FLDDesc;
  486. typedef FLDDesc far *pFLDDesc;
  487.  
  488. //============================================================================
  489. //                    Index descriptor
  490. //============================================================================
  491.  
  492.  
  493. typedef struct                            // Index description
  494.    {
  495.       DBITBLNAME     szName;                 // Index name
  496.       UINT16         iIndexId;               // Index number
  497.       DBINAME        szTagName;              // Tag name (for dBASE)
  498.       DBINAME        szFormat;               // Optional format (BTREE, HASH etc)
  499.       BOOL16         bPrimary;               // True, if primary index
  500.       BOOL16         bUnique;                // True, if unique keys
  501.       BOOL16         bDescending;            // True, for descending index
  502.       BOOL16         bMaintained;            // True, if maintained index
  503.       BOOL16         bSubset;                // True, if subset index
  504.       BOOL16         bExpIdx;                // True, if expression index
  505.       UINT16         iCost;                  // Not used
  506.       UINT16         iFldsInKey;             // Fields in the key (1 for Exp)
  507.       UINT16         iKeyLen;                // Phy Key length in bytes (Key only)
  508.       BOOL16         bOutofDate;             // True, if index out of date
  509.       UINT16         iKeyExpType;            // Key type of Expression
  510.       DBIKEY         aiKeyFld;               // Array of field numbers in key
  511.       DBIKEYEXP      szKeyExp;               // Key expression
  512.       DBIKEYEXP      szKeyCond;              // Subset condition
  513.       BOOL16         bCaseInsensitive;       // True, if case insensitive index
  514.       UINT16         iBlockSize;             // Block size in bytes
  515.       UINT16         iRestrNum;              // Restructure number
  516.       BOOL16         abDescending[DBIMAXFLDSINKEY];   // TRUE
  517.       UINT16         iUnUsed[16];
  518.    } IDXDesc;
  519. typedef IDXDesc far *pIDXDesc;
  520.  
  521. //============================================================================
  522. //                    Validity check, Referential integrity descriptors
  523. //============================================================================
  524.  
  525.  
  526.  
  527. // Subtypes for Lookup
  528.  
  529. typedef enum                              // Paradox Lookup type
  530.    {
  531.       lkupNONE          = 0,                 // Has no lookup
  532.       lkupPRIVATE       = 1,                 // Just Current Field + Private
  533.       lkupALLCORRESP    = 2,                 // All Corresponding + No Help
  534.       lkupHELP          = 3,                 // Just Current Fld + Help and Fill
  535.       lkupALLCORRESPHELP= 4                  // All Corresponging + Help
  536.    } LKUPType;
  537.  
  538. #define TODAYVAL   2                       // for Min/Max/Def val flags
  539. #define NOWVAL     3                       // for Min/Max/Def val flags
  540.  
  541.    // In VCHKDesc below, if any of bHasMinVal/bHasMaxVal/bHasDefVal
  542.    // = TODAYVAL, then TODAY is assumed , = NOWVAL, then current time/today is assumed
  543.  
  544. typedef struct                            // Val Check structure
  545.    {
  546.       UINT16         iFldNum;                // Field number
  547.       BOOL16         bRequired;              // If True, value is required
  548.       BOOL16         bHasMinVal;             // If True, has min value
  549.       BOOL16         bHasMaxVal;             // If True, has max value
  550.       BOOL16         bHasDefVal;             // If True, has default value
  551.       DBIVCHK        aMinVal;                // Min Value
  552.       DBIVCHK        aMaxVal;                // Max Value
  553.       DBIVCHK        aDefVal;                // Default value
  554.       DBIPICT        szPict;                 // Picture string
  555.       LKUPType       elkupType;              // Lookup/Fill type
  556.       DBIPATH        szLkupTblName;          // Lookup Table name
  557.    } VCHKDesc;
  558. typedef VCHKDesc far *pVCHKDesc;
  559.  
  560. typedef enum                              // Ref integrity type
  561.    {
  562.       rintMASTER     = 0,                    // This table is Master
  563.       rintDEPENDENT  = 1                     // This table is Dependent
  564.    } RINTType;
  565.  
  566. typedef enum                              // Ref integrity action/qualifier
  567.    {
  568.       rintRESTRICT   = 0,                    // Prohibit operation
  569.       rintCASCADE    = 1                     // Cascade operation
  570.    } RINTQual;
  571.  
  572. typedef struct                            // Ref Integrity Desc
  573.    {
  574.       UINT16         iRintNum;               // Ref integrity number
  575.       DBINAME        szRintName;             // A name to tag this integegrity constraint
  576.       RINTType       eType;                  // Whether master/dependent
  577.       DBIPATH        szTblName;              // Other table name
  578.       RINTQual       eModOp;                 // Modify qualifier
  579.       RINTQual       eDelOp;                 // Delete qualifier
  580.       UINT16         iFldCount;              // Fields in foreign key
  581.       DBIKEY         aiThisTabFld;           // Fields in this table
  582.       DBIKEY         aiOthTabFld;            // Fields in other table
  583.    } RINTDesc;
  584. typedef RINTDesc far *pRINTDesc;
  585.  
  586.  
  587. //============================================================================
  588. //                    Security descriptor
  589. //============================================================================
  590. // Family rights
  591.  
  592. #define NOFAMRIGHTS     0x00                 // No Family rights
  593. #define FORMRIGHTS      0x01                 // Can change form
  594. #define RPTRIGHTS       0x02                 // Can change reports
  595. #define VALRIGHTS       0x04                 // Can change valchecks
  596. #define SETRIGHTS       0x08                 // Can change settings
  597. #define ALLFAMRIGHTS    (FORMRIGHTS | RPTRIGHTS | VALRIGHTS | SETRIGHTS)
  598.                                              // All family rights
  599.  
  600. typedef enum  {                           // Privileges
  601.       prvNONE        = 0,                    // No privilege
  602.       prvREADONLY    = 0x01,                 // Read only Table or Field
  603.       prvMODIFY      = 0x03,                 // Read and Modify fields (non-key)
  604.       prvINSERT      = 0x07,                 // Insert + All of above
  605.       prvINSDEL      = 0x0F,                 // Delete + All of above
  606.       prvFULL        = 0x1F,                 // Full Writes
  607.       prvUNKNOWN     = 0xFF                  // Unknown
  608.    } PRVType;
  609.  
  610.  
  611. typedef struct {                             // Security description
  612.       UINT16         iSecNum;                   // Nbr to identify desc
  613.       PRVType        eprvTable;                 // Table privileges
  614.       UINT16         iFamRights;                // Family rights
  615.       DBINAME        szPassword;                // Null terminated string
  616.       PRVType        aprvFld[DBIMAXFLDSINSEC];  // Field level privileges (prvNONE/prvREADONLY/prvFULL)
  617.    } SECDesc;
  618. typedef SECDesc far *pSECDesc;
  619.  
  620.  
  621. //======================================================================
  622. //                         Miscellaneous
  623. //======================================================================
  624.  
  625. // Index Id used to open table without a default index (i.e. no order)
  626.  
  627. #define  NODEFAULTINDEX    0xFFFF
  628.  
  629.  
  630. //============================================================================
  631. //                    Object types
  632. //============================================================================
  633.  
  634. typedef enum
  635.    {
  636.        objSYSTEM                 = 1,      // System object
  637.        objSESSION                = 2,      // Session object
  638.        objDRIVER                 = 3,      // Driver object
  639.        objDATABASE               = 4,      // Database object
  640.        objCURSOR                 = 5,      // Cursor object
  641.        objSTATEMENT              = 6,      // Statement object
  642.        objCLIENT                 = 7,      // Client object
  643.        objDBSEC                  = 8,      // DbSystem object (dBASE only)
  644.        objREPOSITORY             = 9       // Data Repository object
  645.    }  DBIOBJType;
  646.  
  647. //============================================================================
  648. //                    Cursor properties
  649. //============================================================================
  650.  
  651.  
  652. typedef enum                              // Database/Table Share type
  653.    {
  654.       dbiOPENSHARED     = 0,                 // Open shared  (Default)
  655.       dbiOPENEXCL       = 1,                 // Open exclusive
  656.    } DBIShareMode;
  657.  
  658. typedef enum                              // Database/Table Access type
  659.    {
  660.       dbiREADWRITE      = 0,                 // Read + Write   (Default)
  661.       dbiREADONLY       = 1                  // Read only
  662.    } DBIOpenMode;
  663.  
  664. typedef enum                              // Lock types (Table level)
  665.    {
  666.       dbiNOLOCK         = 0,                 // No lock   (Default)
  667.       dbiWRITELOCK      = 1,                 // Write lock
  668.       dbiREADLOCK       = 2                  // Read lock
  669.    } DBILockType;
  670.  
  671. typedef enum                              // Field translate mode
  672.    {
  673.       xltNONE        = 0,                    // No translation  (Physical Types)
  674.       xltRECORD      = 1,                    // Record level translation (not supported)
  675.       xltFIELD       = 2,                    // Field level translation (Logical types)
  676.    } XLTMode;
  677.  
  678. typedef enum                              // Update lock mode (SQL only)
  679.    {
  680.       updWHEREALL    = 0,                    // All fields in WHERE clause
  681.       updWHEREKEYCHG = 1,                    // Keyed and changed fields in WHERE clause
  682.       updWHEREKEY    = 2                     // Keyed fields in WHERE clause
  683.    } UPDLockMode;
  684.  
  685.  
  686. // Table levels
  687.  
  688. #define TBLLEVEL3    3              // Paradox level 3 and dBASE level 3+
  689. #define TBLLEVEL4    4              // Paradox level 4 and dBASE level 4
  690. #define TBLLEVEL5    5              // Paradox level 5 and dBASE/Win
  691. #define TBLLEVEL7    7              // Paradox level 7 , Win32
  692. #define FOXLEVEL25   25             // Fox Table (Ver 2.5)
  693.  
  694. typedef struct {                          // Virtual Table properties
  695.       DBITBLNAME     szName;                 // table name (no extension, if it can be derived)
  696.       UINT16         iFNameSize;             // Full file name size
  697.       DBINAME        szTableType;            // Driver type
  698.       UINT16         iFields;                // No of fields in Table
  699.       UINT16         iRecSize;               // Record size (logical record)
  700.       UINT16         iRecBufSize;            // Record size (physical record)
  701.       UINT16         iKeySize;               // Key size
  702.       UINT16         iIndexes;               // Number of indexes
  703.       UINT16         iValChecks;             // Number of val checks
  704.       UINT16         iRefIntChecks;          // Number of Ref Integrity constraints
  705.       UINT16         iBookMarkSize;          // Bookmark size
  706.       BOOL16         bBookMarkStable;        // Stable book marks
  707.       DBIOpenMode    eOpenMode;              // ReadOnly / RW
  708.       DBIShareMode   eShareMode;             // Excl / Share
  709.       BOOL16         bIndexed;               // Index is in use
  710.       INT16          iSeqNums;               // 1: Has Seqnums; 0: Has Record#
  711.                                              // <0 (-1, -2, ...): None (e.g. SQL)
  712.       BOOL16         bSoftDeletes;           // Supports soft deletes
  713.       BOOL16         bDeletedOn;             // If above, deleted recs seen
  714.       UINT16         iRefRange;              // Not used
  715.       XLTMode        exltMode;               // Translate Mode
  716.       UINT16         iRestrVersion;          // Restructure version number
  717.       BOOL16         bUniDirectional;        // Cursor is uni-directional
  718.       PRVType        eprvRights;             // Table  rights
  719.       UINT16         iFmlRights;             // Family rights
  720.       UINT16         iPasswords;             // Number of Aux passwords
  721.       UINT16         iCodePage;              // Codepage (0 if unknown)
  722.       BOOL16         bProtected;             // Table is protected by password
  723.       UINT16         iTblLevel;              // Driver dependent table level
  724.       DBINAME        szLangDriver;           // Language driver name
  725.       BOOL16         bFieldMap;              // Field map active
  726.       UINT16         iBlockSize;             // Physical file blocksize in K
  727.       BOOL16         bStrictRefInt;          // Strict referential integrity
  728.       UINT16         iFilters     ;          // Number of filters
  729.       BOOL16         bTempTable   ;          // Table is a temporary table
  730.       UINT16         iUnUsed[16];
  731.      } CURProps;
  732. typedef CURProps far *pCURProps;
  733.  
  734. //============================================================================
  735. //                   Record Properties
  736. //============================================================================
  737.  
  738.  
  739. typedef struct {                          // Record properties
  740.       UINT32         iSeqNum;                // When Seq# supported only
  741.       UINT32         iPhyRecNum;             // When Phy Rec#s supported only
  742.       UINT16         bRecChanged;            // Used by Delayed Updates Cur
  743.       BOOL16         bSeqNumChanged;         // Not used
  744.       BOOL16         bDeleteFlag;            // When soft delete supported only
  745.    } RECProps;
  746. typedef RECProps far *pRECProps;
  747.  
  748.  
  749. //============================================================================
  750. //                   General properties  DbiGetProp/DbiSetProp
  751. //============================================================================
  752.  
  753.  
  754. // Cursor properties
  755. // General
  756.  
  757. #define  curMAXPROPS         0x00050000l   //ro UINT16   , Number of defined properties
  758. #define  curTABLENAME        0x00050001l   //ro pTBLNAME , Table name
  759. #define  curTABLETYPE        0x00050002l   //ro pDBINAME , Table type
  760. #define  curTABLELEVEL       0x00050003l   //ro UINT16   , Table level 1..n
  761. #define  curFILENAME         0x00050004l   //ro pPATH    , Full filename
  762. #define  curXLTMODE          0x00050005l   //rw XLTMode  , Translate mode
  763. #define  curSEQREADON        0x00050006l   //rw BOOL     , Sequential read mode hint ON
  764. #define  curONEPASSON        0x00050007l   //rw BOOL     , One pass mode hint ON
  765. #define  curUPDATETS         0x00050008l   //ro TIMESTAMP, Update timestamp
  766. #define  curSOFTDELETEON     0x00050009l   //rw BOOL     , Softdelete ON
  767. #define  curLANGDRVNAME      0x0005000Al   //ro pCHAR    , Symbolic language drv. name
  768. #define  curCURSORNAME       0x0005000Bl   //ro pCHAR    , name of the cursor
  769. #define  maxcurPROPS      11               // keep in sync when adding cursor properties
  770.  
  771. // Paradox specific
  772. #define  curPDXMAXPROPS      0x01050000l   //ro UINT16   , Number of defined properties
  773. #define  maxcurPDXPROPS   0
  774.  
  775. // DBase specific
  776. #define  curDBMAXPROPS       0x02050000l   //ro UINT16   , Number of defined properties
  777. #define  curINEXACTON        0x02050001l   //rw BOOL     , InExact match ON
  778. #define  curSHAREMODE        0x02050002l   //rw DBIShareMode, Share mode
  779. #define  maxcurDBPROPS    2
  780.  
  781. // Text Driver specific
  782. #define  curDELIMITALLFLDS   0x03050000l   //rw BOOL , Delimit all fields.
  783. #define  curUSESCHEMAFILE    0x03050001l   //rw BOOL , read schema from a file
  784.  
  785. // SQL Driver specific
  786. #define  curUPDLOCKMODE      0x04050000l   //rw UPDLockMode ,Update lock mode
  787. #define  curNATIVEHNDL       0x04050001l   //ro pBYTE       ,Native cursor handle
  788. #define  curMAXROWS          0x04050002l   //rw INT32       ,Max # of rows to fetch from server
  789. #define  curGETEXTENDEDINFO  0x04050003l   //rw BOOL , Get RINT info etc.
  790.  
  791. // Delayed Updates Specific.
  792. #define  curDELAYUPDRECSTATE        0x05050001l  // ro DELYUPDCbDesc
  793. #define  curDELAYUPDABORTRESTORE    0x05050002l  // rw BOOL, restore state
  794.                                                  // when commit is aborted.
  795. #define  curDELAYUPDDISPLAYOPT      0x05050003l  // rw UINT16, view records
  796.                                                  // with specific update stat
  797. #define  curDELAYUPDGETOLDRECORD    0x05050004l  // rw BOOL, get un-modified
  798.                                                  // rec buf for modified recs
  799. #define  curDELAYUPDNUMUPDATES      0x05050005l  // ro INT32, num of updates
  800. #define  curDELAYUPDUSECALLBACK     0x05050006l  // rw BOOL, callback usr.
  801.  
  802. // Driver properties
  803. // General
  804. #define  drvMAXPROPS         0x00030000l   //ro UINT16   , Number of defined properties
  805. #define  drvDRIVERTYPE       0x00030002l   //ro pDBINAME , Driver type
  806. #define  drvDRIVERVERSION    0x00030003l   //ro UINT16   , Driver version
  807. #define  maxdrvPROPS      2                // keep in sync when adding driver properties
  808.  
  809. // SQL Driver specific
  810. #define  drvNATIVESQLCA      0x00030004l   //ro pBYTE    , Native SQLCA structure (Informix)
  811.  
  812. // Database properties
  813. // General
  814. #define  dbMAXPROPS         0x00040000l   //ro UINT16   , Number of defined properties
  815. #define  dbDATABASENAME     0x00040001l   //ro pDBINAME , Database name/alias
  816. #define  dbDATABASETYPE     0x00040002l   //ro pDBINAME , Database type
  817. #define  dbDEFAULTDRIVER    0x00040003l   //rw pDBINAME , Default Driver name
  818. #define  dbPARAMFMTQMARK    0x00040004l   //rw BOOL     , Stmt param marker fmt = ?
  819. #define  dbUSESCHEMAFILE    0x00040005l   //rw BOOL , for text driver only.
  820. #define  maxdbPROPS       19              // keep in sync when adding ANY db properties
  821.  
  822. // SQL Driver specific
  823. #define  dbASYNCSUPPORT     0x04040000l   //ro BOOL     , Async. qry exec support
  824. #define  dbPROCEDURES       0x04040001l   //ro BOOL     , Stored procedure support
  825. #define  dbDEFAULTTXNISO    0x04040002l   //ro eXILType , Default transaction iso level
  826. #define  dbNATIVEHNDL       0x04040003l   //ro pBYTE    , Native connection handle
  827. #define  dbNATIVEPASSTHRUHNDL 0x04040004l //ro pBYTE    , Native passthru connection handle
  828. #define  dbSERVERVERSION    0x04040005l   //ro UINT16   , Major server version number
  829. #define  dbBATCHCOUNT       0x04040006l   //rw UINT16   , Batch modification count before auto-commit
  830. #define  dbTRACEMODE        0x04040007l   //rw UINT16   , Trace mode
  831. #define  dbCURRENTUSERNAME  0x04040008l   //ro UINT16   , Current User Name
  832. #define  dbOWNERQUALIFIED   0x04040009l   //ro BOOL     , For SQL Link Drivers - does this driver support
  833. #define  dbQUOTECHAR        0x0404000Al   //ro CHAR     , Quote character for quoting Object Names
  834. #define  dbONLINE           0x0404000Bl   //ro BOOL     , Informix ONLINE
  835. #define  dbTRANALLOWED      0x0404000Cl   //ro BOOL     , Informix Transactions allowed.
  836. #define  dbANSI             0x0404000Dl   //ro BOOL     , Informix Ansi complaint database.
  837.  
  838. // Session properties
  839. // General
  840. #define  sesMAXPROPS         0x00020000l   //ro UINT16   , Number of defined properties
  841. #define  sesSESSIONNAME      0x00020001l   //ro pDBINAME , Name of seesion
  842. #define  sesNETFILE          0x00020002l   //rw pCHAR    , Full filename of netfile (MAXPATHLEN)
  843. #define  sesCFGMODE          0x00020003l   //rw CFGMode, Mode of configuration file.
  844. #define  sesDEFAULTDRIVER    0x00020004l   //rw pDBINAME, default driver name
  845. #define  sesGROUPNAME        0x00020005l   //rw pCHAR, Security - user group name (dBASE)
  846. #define  sesUSERNAME         0x00020006l   //rw pCHAR, User Name
  847. #define  sesUSERPASSWORD     0x00020007l   //rw pCHAR, User password
  848. #define  sesSECFILENAME      0x00020008l   //rw pCHAR, Location of dBASE Security file
  849. #define  sesDRNAME           0x00020009l   //rw pCHAR, Repository Database Name
  850. #define  maxsesPROPS      9                // keep in sync when adding session properties
  851.  
  852. // System properties
  853. // General
  854. #define   sysMAXPROPS        0x00010000l   // ro UINT16  , Number of defined properties
  855. #define   sysLOWMEMUSAGE     0x00010001l   // ro UINT16  , Low memory usage in (k)
  856. #define   maxsysPROPS     1                // keep in sync when adding system properties
  857.  
  858. // Statement properties
  859. // General
  860. #define  stmtMAXPROPS        0x00060001l   //ro UINT16      Number of defined properties
  861. #define  stmtPARAMETERCOUNT  0x00060002l   //ro UINT16      Count of parameters
  862. #define  stmtPARAMETERDESCS  0x00060003l   //ro aFLDDesc    Array of parameters
  863. #define  stmtLANGDRVNAME     0x00060004l   //ro pCHAR       Symbolic language drv. name
  864. #define  stmtUNIDIRECTIONAL  0x00060010l   //rw BOOL        Cursor Unidirectional
  865. #define  stmtCURSORNAME      0x00060011l   //rw pCHAR       Cursor name
  866. #define  stmtNEWCONNECT      0x00060012l   //rw BOOL        Stmt on new connection
  867. #define  stmtNATIVEHNDL      0x00060013l   //ro pBYTE       Native statement handle
  868. #define  stmtROWCOUNT        0x00060014l   //ro UINT32      Rows effected by a stmt
  869. #define  stmtEXECASCURSOR    0x00060015l   //rw BOOL        Open a server cursor (ct-lib)
  870. #define  maxstmtPROPS     32               // keep in sync when adding ANY stmt properties
  871.  
  872. // specific to QBE or local SQL
  873. #define  stmtANSTYPE         0x00060020l   //rw pBYTE       Table Type of Answer set
  874. #define  stmtLIVENESS        0x00060021l   //rw LIVENESS    Preference for canned/live answers
  875. #define  stmtQRYMODE         0x00060022l   //rw QryEvalMode Execute on server or local or either
  876. #define  stmtBLANKS          0x00060023l   //rw BOOL        True if blanks to be regarded as zeros.
  877. #define  stmtDATEFORMAT      0x00060024l   //rw FMTDate     Date format
  878. #define  stmtNUMBERFORMAT    0x00060025l   //rw FMTNumber   Number format
  879. #define  stmtAUXTBLS         0x00060026l   //rw BOOL        True if QBE to create CHANGED, etc.
  880. #define  stmtTBLVECTOR       0x00060027l   //ro UINT16      Vector of tables generated by query.
  881. #define  stmtALLPROPS        0x00060028l   //rw QueryLowProps
  882. #define  stmtALLPROPSSIZE    0x00060029l   //rw INT16       size of QueryLowProps
  883. #define  stmtANSNAME         0x00060030l   //rw pBYTE       Answer Table Name.
  884. #define  stmtCONSTRAINED     0x00060031l   //rw BOOL        Constrain input
  885. #define  stmtFIELDDESCS      0x00060032l   //rw pFLDDESC    Answer FieldDescs
  886. #define  stmtCURPROPS        0x00060033l   //rw pCURProps    Answer Curprops
  887. #define  stmtDEFDBNAME       0x00060034l   //rw pCURProps    Answer Curprops
  888. #define  stmtXLTMODE         0x00060035l   //rw XLTMode      Xltmode
  889. #define  stmtINSTBLNAME      0x00060036l   //ro DBITBLNAME  INSERT table's name
  890. #define  stmtINSERRTBLNAME   0x00060037l   //ro DBITBLNAME  ERRINS table's name
  891. #define  stmtUPDTBLNAME      0x00060038l   //ro DBITBLNAME  UPDATE table's name
  892. #define  stmtUPDERRTBLNAME   0x00060039l   //ro DBITBLNAME  ERRUPD table's name
  893. #define  stmtDELTBLNAME      0x00060040l   //ro DBITBLNAME  DELETED table's name
  894. #define  stmtDELERRTBLNAME   0x00060041l   //ro DBITBLNAME  ERRDEL table's name
  895. #define  stmtCANNEDREADONLY   0x00060042l  //ro BOOL canned answers are readonly
  896.  
  897.  
  898. //============================================================================
  899. //                    Transactions
  900. //============================================================================
  901.  
  902. // Transaction support
  903.  
  904. typedef enum                           // Transaction isolation levels
  905.    {
  906.       xilDIRTYREAD,                    // Uncommitted changes read
  907.       xilREADCOMMITTED,                // Committed changes, no phantoms
  908.       xilREPEATABLEREAD                // Full read repeatability
  909.    } eXILType;
  910.  
  911. typedef enum                           // Transaction end control
  912.    {
  913.       xendCOMMIT,       // Commit transaction
  914.       xendCOMMITKEEP,   // Commit transaction, keep cursors
  915.       xendABORT         // Rollback transaction
  916.    } eXEnd;
  917.  
  918. typedef enum                           // Transaction end control
  919.    {
  920.       xsINACTIVE,       // Transaction inactive
  921.       xsACTIVE          // Transaction active
  922.    } eXState;
  923.  
  924. typedef struct
  925.    {
  926.       eXState        exState;          // xsActive, xsInactive
  927.       eXILType       eXIL;             // Xact isolation level
  928.       UINT16         uNests;           // Xact children
  929.    } XInfo, *pXInfo;
  930.  
  931.  
  932. //============================================================================
  933. //                         BookMark compares
  934. //============================================================================
  935.  
  936. typedef enum                              // Compare BookMark Results
  937.    {
  938.       CMPLess           = -1,             // Bkm1 < Bkm2
  939.       CMPEql            = 0,              // BookMarks are exactly the same
  940.       CMPGtr            = 1,              // Bkm1 > Bkm2
  941.       CMPKeyEql         = 2               // Only Bkm1.key_val = Bkm2.key_val
  942.    } CMPBkMkRslt;
  943. typedef CMPBkMkRslt far *pCMPBkMkRslt;
  944.  
  945.  
  946. //===========================================================================
  947. //                            Key searches
  948. //===========================================================================
  949.  
  950. typedef enum  {                           // Search condition for keys
  951.       keySEARCHEQ       = 0,                 // =
  952.       keySEARCHGT       = 1,                 // >
  953.       keySEARCHGEQ      = 2,                 // >=
  954.     } DBISearchCond;
  955.  
  956.  
  957. //============================================================================
  958. //                      Create/Restructure descriptor
  959. //============================================================================
  960.  
  961. typedef enum                              // Create/Restruct Operation type
  962.    {
  963.       crNOOP         = 0,
  964.       crADD          = 1,                    // Add a new element.
  965.       crCOPY         = 2,                    // Copy an existing element.
  966.       crMODIFY       = 3,                    // Modify an element.
  967.       crDROP         = 4,                    // Removes an element.
  968.       crREDO         = 5,                    // Reconstruct an element.
  969.       crTABLE        = 6,                    // Not used
  970.       crGROUP        = 7,                    // Not used
  971.       crFAMILY       = 8,                    // Not used
  972.       crDONE         = 9,                    // Used internally
  973.       crDROPADD      = 10                    // Used internally
  974.    } CROpType;
  975.  
  976. typedef CROpType far *pCROpType;
  977.  
  978. typedef struct                            // Create/Restruct Table descr
  979.    {
  980.       DBITBLNAME     szTblName;                 // TableName incl. optional path & ext
  981.       DBINAME        szTblType;                 // Driver type (optional)
  982.       DBIPATH        szErrTblName;              // Error Table name (optional)
  983.       DBINAME        szUserName;                // User name (if applicable)
  984.       DBINAME        szPassword;                // Password (optional)
  985.       BOOL16         bProtected;                // Master password supplied in szPassword
  986.       BOOL16         bPack;                     // Pack table (restructure only)
  987.  
  988.       UINT16         iFldCount;                 // Number of field defs supplied
  989.       pCROpType      pecrFldOp;                 // Array of field ops
  990.       pFLDDesc       pfldDesc;                  // Array of field descriptors
  991.  
  992.       UINT16         iIdxCount;                 // Number of index defs supplied
  993.       pCROpType      pecrIdxOp;                 // Array of index ops
  994.       pIDXDesc       pidxDesc;                  // Array of index descriptors
  995.  
  996.       UINT16         iSecRecCount;              // Number of security defs supplied
  997.       pCROpType      pecrSecOp;                 // Array of security ops
  998.       pSECDesc       psecDesc;                  // Array of security descriptors
  999.  
  1000.       UINT16         iValChkCount;              // Number of val checks
  1001.       pCROpType      pecrValChkOp;              // Array of val check ops
  1002.       pVCHKDesc      pvchkDesc;                 // Array of val check descs
  1003.  
  1004.       UINT16         iRintCount;                // Number of ref int specs
  1005.       pCROpType      pecrRintOp;                // Array of ref int ops
  1006.       pRINTDesc      printDesc;                 // Array of ref int specs
  1007.  
  1008.       UINT16         iOptParams;                // Number of optional parameters
  1009.       pFLDDesc       pfldOptParams;             // Array of field descriptors
  1010.       pBYTE          pOptData;                  // Optional parameters
  1011.  
  1012.    } CRTblDesc;
  1013.  
  1014. typedef CRTblDesc far *pCRTblDesc;
  1015.  
  1016.  
  1017. //============================================================================
  1018. //                      Batch
  1019. //============================================================================
  1020.  
  1021.  
  1022. typedef struct                            // Batch Table definition struct
  1023.    {
  1024.       hDBIDb         hDb;                       // Database
  1025.       DBIPATH        szTblName;                 // Table name
  1026.       DBINAME        szTblType;                 // Optional Driver type
  1027.       DBINAME        szUserName;                // Optional User name
  1028.       DBINAME        szPassword;                // Optional Pass word
  1029.    } BATTblDesc;
  1030.  
  1031. typedef BATTblDesc far *pBATTblDesc;
  1032.  
  1033. typedef enum                   // Batch mode for DBIBatchMove
  1034.    {
  1035.       batAPPEND =       0,
  1036.       batUPDATE =       1,
  1037.       batAPPENDUPDATE = 2,
  1038.       batSUBTRACT =     3,
  1039.       batCOPY     =     4
  1040.    } eBATMode;
  1041.  
  1042. typedef enum                              // Sort Order
  1043.    {
  1044.       sortASCEND     = 0,                    // ascending (default)
  1045.       sortDESCEND    = 1,                    // descending
  1046.    } SORTOrder;
  1047.  
  1048. typedef SORTOrder far *pSORTOrder;
  1049.  
  1050. typedef INT16 (DBIFN  * pfSORTCompFn)     // pntr to client compare fn
  1051.    (
  1052.       pVOID          pLdObj,                 // Language driver, if needed
  1053.       pVOID          pValue1,                // first value
  1054.       pVOID          pValue2,                // second value
  1055.       UINT16         iLen                    // Length, if needed
  1056.    );
  1057.    // Returns: -1 if (Value 1 < Value 2),
  1058.    //           0 if (Value 1 == Value 2),
  1059.    //          +1 if (Value 1 > Value 2)
  1060.  
  1061.  
  1062. //===========================================================================
  1063. //                      Types/Structs for Capabilities
  1064. //===========================================================================
  1065.  
  1066. typedef enum                           // Driver Category
  1067.    {
  1068.       drvFILE           = 1,              // File based (Paradox, xBASE)
  1069.       drvOTHERSERVER    = 2,              // Other kind of server (IMS ?)
  1070.       drvSQLBASEDSERVER = 3               // SQL Based Server
  1071.    } DRVCat;
  1072.  
  1073. typedef enum                           // Config info & Optional Parameters
  1074.    {
  1075.       opDBCREATE        = 3,
  1076.       opDBOPEN          = 4,
  1077.       opTBLCREATE       = 5,
  1078.       opTBLOPEN         = 6
  1079.    } OPType;
  1080.  
  1081. typedef struct                         // Driver Description/Capabilities
  1082.    {
  1083.       DBINAME        szType;                 // Symbolic name to identify
  1084.       DBINAME        szText;                 // Descriptive text
  1085.       DRVCat         edrvCat;                // Driver category
  1086.       BOOL16         bTrueDb;                // Supports True Db concept
  1087.       DBINAME        szDbType;               // Db Type to be used
  1088.       BOOL16         bMultiUser;             // Supports Multi-user access
  1089.       BOOL16         bReadWrite;             // Read Write or Read-only
  1090.       BOOL16         bTrans;                 // Supports Transactions
  1091.       BOOL16         bPassThruSQL;           // Supports Pass-thru SQL
  1092.       BOOL16         bLogIn;                 // Requires explicit login
  1093.       BOOL16         bCreateDb;              // Can reate a Database
  1094.       BOOL16         bDeleteDb;              // Can drop database
  1095.       BOOL16         bCreateTable;           // Can create a Table
  1096.       BOOL16         bDeleteTable;           // Can delete a Table
  1097.       BOOL16         bMultiplePWs;           // Multiple passwords
  1098.       UINT16         iDriverVersion;         // Driver version 1..n
  1099.       BOOL16         bSQLRowid;              // Supports SQL rowid
  1100.       UINT16         iUnUsed[15];
  1101.    } DRVType;
  1102. typedef DRVType far *pDRVType;
  1103.  
  1104.  
  1105. typedef struct                            // Table Capabilities
  1106.    {
  1107.       UINT16         iId;                    // Id of Table Type
  1108.       DBINAME        szName;                 // Symbolic name; eg "dBASE"
  1109.       DBINAME        szText;                 // Descriptive text
  1110.       DBINAME        szFormat;               // Format; eg "HEAP"
  1111.       BOOL16         bReadWrite;             // User can Read/Write
  1112.       BOOL16         bCreate;                // Can create new tables
  1113.       BOOL16         bRestructure;           // Can restructure this table
  1114.       BOOL16         bValChecks;             // Val Checks can be specified
  1115.       BOOL16         bSecurity;              // Can be protected
  1116.       BOOL16         bRefIntegrity;          // Can participate in ref integrity
  1117.       BOOL16         bPrimaryKey;            // Supports primary key concept
  1118.       BOOL16         bIndexing;              // Can have other indexes
  1119.       UINT16         iFldTypes;              // Number of Phy Field types supported
  1120.       UINT16         iMaxRecSize;            // Max record size
  1121.       UINT16         iMaxFldsInTable;        // Max fields in a table
  1122.       UINT16         iMaxFldNameLen;         // Maximum field name length
  1123.       UINT16         iTblLevel;              // Driver dependent table level (version)
  1124.       UINT16         iUnUsed[16];
  1125.     } TBLType;
  1126. typedef TBLType far *pTBLType;
  1127.  
  1128.  
  1129. typedef struct
  1130.    {
  1131.       UINT16         iId;                    // Id of Index Type
  1132.       DBINAME        szName;                 // Symbolic name
  1133.       DBINAME        szText;                 // Descriptive text
  1134.       DBINAME        szFormat;               // Optional format(BTREE, HASH etc)
  1135.       BOOL16         bComposite;             // Supports composite keys
  1136.       BOOL16         bPrimary;               // True, if primary index
  1137.       BOOL16         bUnique;                // True, No duplicates supported
  1138.       BOOL16         bKeyDescending;         // If whole key can be descending
  1139.       BOOL16         bFldDescending;         // Field level descending
  1140.       BOOL16         bMaintained;            // Supports maintained option
  1141.       BOOL16         bSubset;                // Supports Subset expression
  1142.       BOOL16         bKeyExpr;               // If Key can be expres
  1143.       BOOL16         bCaseInsensitive;       // Supports Caseinsensitive indexes
  1144.       UINT16         iUnUsed[16];
  1145.    } IDXType;
  1146. typedef IDXType far *pIDXType;
  1147.  
  1148. typedef struct
  1149.    {
  1150.       UINT16         iId;                    // Id of Field Type
  1151.       DBINAME        szName;                 // Symbolic name; eg "ALPHA"
  1152.       DBINAME        szText;                 // Descriptive text
  1153.       UINT16         iPhyType;               // Physical/Native type
  1154.       UINT16         iXltType;               // Default xlated type
  1155.       UINT16         iXltSubType;            // Default xlated sub type
  1156.       UINT16         iMaxUnits1;             // Max units allowed (1)
  1157.       UINT16         iMaxUnits2;             // Max units allowed (2)
  1158.       UINT16         iPhySize;               // Physical size in bytes (per unit)
  1159.       BOOL16         bRequired;              // Supports 'required' option
  1160.       BOOL16         bDefaultVal;            // Supports user specified 'default'
  1161.       BOOL16         bMinVal;                // Supports MIN Val constraint
  1162.       BOOL16         bMaxVal;                // Supports MAX Val constraint
  1163.       BOOL16         bRefIntegrity;          // Can participate in ref integrity
  1164.       BOOL16         bOtherChecks;           // Supports other kinds of checks
  1165.       BOOL16         bKeyed;                 // The field type can be keyed
  1166.       BOOL16         bMultiplePerTable;      // Table can have more than 1 of this type
  1167.       UINT16         iMinUnits1;             // Min units required (1)
  1168.       UINT16         iMinUnits2;             // Min units required (2)
  1169.       BOOL16         bCreateable;            // Type can be created
  1170.       DBINAME        szNativeName;           // Native (SQL) name used in DDL
  1171.       UINT16         iUnUsed[16];
  1172.     } FLDType;
  1173. typedef FLDType far *pFLDType;
  1174.  
  1175.  
  1176. typedef enum                           // PROP Validity
  1177.    {
  1178.       epropINVALID     = 0,            // Property is INVALID (not supported)
  1179.       epropCANGET      = 1,            // You can GET value of the property
  1180.       epropCANSET      = 2             // You can GET and SET value of the property
  1181.    } PROPValid;
  1182.  
  1183.  
  1184. //===========================================================================
  1185. //                               Call Backs
  1186. //===========================================================================
  1187.  
  1188.  
  1189. typedef enum                              // Call back type
  1190.    {
  1191.        cbGENERAL      = 0,                    // General purpose
  1192.        cbRESERVED1    = 1,                    //
  1193.        cbRESERVED2    = 2,                    //
  1194.        cbINPUTREQ     = 3,                    // Input requested
  1195.        cbRESERVED4    = 4,                    //
  1196.        cbRESERVED5    = 5,                    //
  1197.        cbBATCHRESULT  = 6,                    // Batch processing rslts
  1198.        cbRESERVED7    = 7,                    //
  1199.        cbRESTRUCTURE  = 8,                    // Restructure
  1200.        cbRESERVED9    = 9,                    //
  1201.        cbRESERVED10   = 10,                   //
  1202.        cbRESERVED11   = 11,                   //
  1203.        cbRESERVED12   = 12,                   //
  1204.        cbRESERVED13   = 13,                   //
  1205.        cbRESERVED14   = 14,                   //
  1206.        cbRESERVED15   = 15,                   //
  1207.        cbRESERVED16   = 16,                   //
  1208.        cbRESERVED17   = 17,                   //
  1209.        cbTABLECHANGED = 18,                   // Table changed notification
  1210.        cbRESERVED19   = 19,                   //
  1211.        cbCANCELQRY    = 20,                   // Allow user to cancel Query
  1212.        cbRESERVED21   = 21,                   //
  1213.        cbRESERVED22   = 22,                   //
  1214.        cbGENPROGRESS  = 23,                   // Generic Progress report.
  1215.        cbDBASELOGIN   = 24,                   // dBASE Login
  1216.        cbDELAYEDUPD   = 25,
  1217.        cbFIELDRECALC  = 26,                   // Field(s) recalculation
  1218.        cbTRACE        = 27,                   // Trace
  1219.        cbDBLOGIN      = 28,                   // Database login
  1220.        cbRESERVED29   = 29,                   //
  1221.        cbRESERVED30   = 30,                   //
  1222.        cbRESERVED31   = 31,                   //
  1223.        cbRESERVED32   = 32,                   //
  1224.        cbRESERVED33   = 33,                   //
  1225.        cbNBROFCBS     = 34                    // Number of cbs
  1226.    } CBType;
  1227. typedef CBType far *pCBType;
  1228.  
  1229. typedef enum                              // Call-back return type
  1230.    {
  1231.       cbrUSEDEF        = 0,                  // Take default action
  1232.       cbrCONTINUE      = 1,                  // Continue
  1233.       cbrABORT         = 2,                  // Abort the operation
  1234.       cbrCHKINPUT      = 3,                  // Input given
  1235.       cbrYES           = 4,                  // Take requested action
  1236.       cbrNO            = 5,                  // Do not take requested action
  1237.       cbrPARTIALASSIST = 6,                  // Assist in completing the job
  1238.       cbrSKIP          = 7,                  // Skip this operation
  1239.       cbrRETRY         = 8                   // Retry this operation
  1240.    } CBRType;
  1241. typedef CBRType far *pCBRType;
  1242.  
  1243. typedef CBRType (DBIFN  * pfDBICallBack)  // Call-back funtion pntr type
  1244.    (
  1245.       CBType         ecbType,                // Callback type
  1246.       UINT32         iClientData,            // Client callback data
  1247.       pVOID          pCbInfo                 // Call back info/Client Input
  1248.    );
  1249.  
  1250. typedef pfDBICallBack far *ppfDBICallBack;
  1251.  
  1252. // Progress callback structure
  1253. typedef struct
  1254.    {
  1255.       INT16         iPercentDone;          // Percentage done
  1256.       DBIMSG        szMsg;                 // Message to display
  1257.    } CBPROGRESSDesc;
  1258.  
  1259. typedef  CBPROGRESSDesc far * pCBPROGRESSDesc;
  1260.  
  1261. typedef enum   // type of delayed update object (delayed updates callback)
  1262.    {
  1263.       delayupdNONE        = 0,
  1264.       delayupdMODIFY      = 1,
  1265.       delayupdINSERT      = 2,
  1266.       delayupdDELETE      = 3
  1267.    } DelayUpdErrOpType;
  1268.  
  1269. typedef struct       // delayed updates callback info
  1270.    {
  1271.       DBIResult           iErrCode;
  1272.       DelayUpdErrOpType   eDelayUpdOpType;
  1273.       UINT16              iRecBufSize;  // Record size (physical record)
  1274.       pBYTE               pNewRecBuf;
  1275.       pBYTE               pOldRecBuf;
  1276.    } DELAYUPDCbDesc;
  1277.  
  1278. typedef enum        // type of restructure object (restructure callback)
  1279.    {
  1280.       restrNONE        = 0,
  1281.       restrNEWFLD      = 1,
  1282.       restrOLDFLD      = 2,
  1283.       restrNEWINDEX    = 3,
  1284.       restrOLDINDEX    = 4,
  1285.       restrNEWVCHK     = 5,
  1286.       restrOLDVCHK     = 6,
  1287.       restrNEWRINT     = 7,
  1288.       restrOLDRINT     = 8,
  1289.       restrNEWSEC      = 9,
  1290.       restrOLDSEC      = 10,
  1291.       restrNEWTABLE    = 11
  1292.    } RESTErrObjType;
  1293.  
  1294. typedef struct  {               //  Database login
  1295.    DBINAME        szDbName;             // Database name
  1296.    DBIOpenMode    eOpenMode;            // Open type desired
  1297.    DBIShareMode   eShareMode;           // Share type desired
  1298.    DBINAME        szPassword;           // Password
  1299.    BOOL           bCallbackToClose;     // Returned flag
  1300.    hDBIDb         hDb;                  // db handle
  1301. } CBDBLogin;
  1302. typedef CBDBLogin *pCBDBLogin;
  1303.  
  1304. typedef enum         // trace categories
  1305.    {
  1306.       traceUNKNOWN   = 0x0000,
  1307.       traceQPREPARE  = 0x0001,   // prepared query statements
  1308.       traceQEXECUTE  = 0x0002,   // executed query statements
  1309.       traceERROR     = 0x0004,   // vendor errors
  1310.       traceSTMT      = 0x0008,   // statement ops (i.e. allocate, free)
  1311.       traceCONNECT   = 0x0010,   // connect / disconnect
  1312.       traceTRANSACT  = 0x0020,   // transaction
  1313.       traceBLOB      = 0x0040,   // blob i/o
  1314.       traceMISC      = 0x0080,   // misc.
  1315.       traceVENDOR    = 0x0100,   // vendor calls
  1316.    } TRACECat;
  1317. typedef TRACECat *pTRACECat;
  1318.  
  1319. typedef struct       // trace callback info
  1320.    {
  1321.       TRACECat    eTraceCat;
  1322.       UINT16      uTotalMsgLen;
  1323.       CHAR        pszTrace[];
  1324.    } TRACEDesc;
  1325. typedef TRACEDesc *pTRACEDesc;
  1326.  
  1327. #if !defined(MIDL)
  1328. typedef struct       // restructure callback info
  1329.    {
  1330.       DBIResult      iErrCode;
  1331.       UINT16         iTblNum;
  1332.       UINT16         iObjNum;
  1333.       // for old objects iObjNum is the sequence or field number,
  1334.       // for new objects it is the order in CRTblDesc
  1335.       RESTErrObjType   eRestrObjType;
  1336.       union
  1337.          {
  1338.             FLDDesc     fldDesc;
  1339.             IDXDesc     idxDesc;
  1340.             VCHKDesc    vchkDesc;
  1341.             RINTDesc    rintDesc;
  1342.             SECDesc     secDesc;
  1343.          } uObjDesc;
  1344.    } RESTCbDesc;
  1345.  
  1346. #endif // !defined(MIDL)
  1347.  
  1348. typedef struct
  1349. {
  1350.       DBINAME        szKeyWord;       // Keyword to display
  1351.       DBIMSG         szHelp;          // Help String
  1352. } CBEntry;
  1353.  
  1354. #define  MAXCBENTRIES    4
  1355.  
  1356. typedef enum
  1357. {
  1358.     cbiMDXMISSING = 1,                  // MDX file missing request
  1359.     cbiPDXLOOKUP  = 2,                  // Lookup table missing
  1360.     cbiPDXBLOB    = 3,                  // Blob file missing
  1361.     cbiDBTMISSING = 4,                   // DBT file missing request
  1362.     cbiDRINPUT    = 5                   // DR Manager needs user input
  1363. }   CBInputId;                          // id's for input requests
  1364.  
  1365. typedef struct
  1366. {
  1367.    CBInputId      eCbInputId;             // Id for this input request
  1368.    INT16          iCount;                 // Number of entries
  1369.    INT16          iSelection;             // Selection 1..n  (In/Out)
  1370.    BOOL16         bSave;                  // Save this option  (In/Out)
  1371.    DBIMSG         szMsg;                  // Message to display
  1372.    CBEntry        acbEntry[MAXCBENTRIES]; // Entries
  1373. } CBInputDesc;
  1374.  
  1375. typedef struct    // dBASE login callback structure
  1376. {
  1377.    DBINAME  szUserName;            // Login name of user
  1378.    DBINAME  szGroupName;           // Group to log in to
  1379.    DBINAME  szUserPassword;        // User password
  1380. } CBLoginDesc;
  1381.  
  1382. typedef  CBLoginDesc far * pCBLoginDesc;
  1383.  
  1384.  
  1385. //============================================================================
  1386. //                         Basic Query Types
  1387. //============================================================================
  1388.  
  1389. typedef enum DBIQryLang
  1390. {
  1391.    qrylangUNKNOWN = 0,  // UNKNOWN (Error)
  1392.    qrylangQBE = 1,      // QBE
  1393.    qrylangSQL = 2       // SQL
  1394. } DBIQryLang;
  1395.  
  1396. //============================================================================
  1397. //                         Statement parameter information
  1398. //============================================================================
  1399.  
  1400. typedef enum
  1401. {
  1402.    indTRUNC = -2,         // Value has been truncated
  1403.    indNULL  = -1,         // Value is NULL
  1404.    indVALUE = 1,          //
  1405. } eINDValues;
  1406.  
  1407. #define INDLEN             sizeof (INT16)
  1408.  
  1409. typedef enum STMTParamType
  1410. {
  1411.    paramUNKNOWN    = 0, // UNKNOWN (Error)
  1412.    paramIN         = 1, // Input parameter
  1413.    paramOUT        = 2, // Output parameter
  1414.    paramINOUT      = 3, // Input/Output parameter
  1415.    paramRET        = 4  // Procedure (or function) return
  1416. } STMTParamType;
  1417.  
  1418. typedef enum STMTParamFormat
  1419. {
  1420.    paramfmtUNKNOWN = 0, // UNKNOWN (Error)
  1421.    paramfmtNUMBER  = 1, // Numbered parameter markers of the form ? or :n
  1422.    paramfmtNAME    = 2  // Named parameters markers of the form :name
  1423. } STMTParamFormat;
  1424.  
  1425.  
  1426. //============================================================================
  1427. //                         Properties For DbiQPrepareExt
  1428. //============================================================================
  1429.  
  1430. #define qprepNONE       0     // like DbiQPrepare
  1431. #define qprepFORUPDATE  0x1   // do extra work, anticipating UPDATE WHERE CURRENT
  1432.  
  1433.  
  1434. //============================================================================
  1435. //                      Date, Time, Number Formats
  1436. //============================================================================
  1437.  
  1438.  
  1439. typedef struct                         // Date Format
  1440.    {
  1441.       CHAR        cDecimalSeparator;         // Default "."
  1442.       CHAR        cThousandSeparator;        // Default ","
  1443.       INT8        iDecimalDigits;            // Default 2
  1444.       INT8        bLeadingZero;              // Default TRUE.
  1445.    } FMTNumber;
  1446. typedef FMTNumber far *pFMTNumber;
  1447.  
  1448. typedef struct
  1449.    {
  1450.       CHAR        szDateSeparator[4];        // Default "/"
  1451.       INT8        iDateMode;                 // 0 = MDY (Def), 1 = DMY, 2 = YMD
  1452.       INT8        bFourDigitYear;            // Write Year as 4 digits (FALSE)
  1453.       INT8        bYearBiased;               // On input add 1900 to year (TRUE)
  1454.       INT8        bMonthLeadingZero;         // Month with Leading Zero (TRUE)
  1455.       INT8        bDayLeadingZero;           // Day with Leading Zero (TRUE)
  1456.    } FMTDate;
  1457. typedef FMTDate far *pFMTDate;
  1458.  
  1459. typedef struct
  1460.    {
  1461.      CHAR         cTimeSeparator;            // Default ":"
  1462.      INT8         bTwelveHour;               // Represent as 12 Hour time (FALSE)
  1463.      CHAR         szAmString[6];             // Default Null (Only for 12 Hr)
  1464.      CHAR         szPmString[6];             // Default Null (Only for 12 Hr)
  1465.      INT8         bSeconds;                  // Show Seconds (TRUE)
  1466.      INT8         bMilSeconds;               // Show Milli Seconds (FALSE)
  1467.    } FMTTime;
  1468. typedef FMTTime far *pFMTTime;
  1469.  
  1470.  
  1471. typedef struct
  1472. {
  1473.     BYTE    iPrecision;          // 1..64 considered valid
  1474.     BYTE    iSignSpecialPlaces;  // sign:1, special:1, places:6
  1475.     BYTE    iFraction [32];      // bcd nibbles, 00..99 per byte, high nibble 1st
  1476. } FMTBcd;
  1477.  
  1478. typedef FMTBcd far * pFMTBcd;
  1479.  
  1480.  
  1481. //============================================================================
  1482. //                              Error Info
  1483. //============================================================================
  1484.  
  1485. typedef struct {                       // Error info
  1486.       DBIResult      iError;                 // Last error code returned
  1487.       DBIMSG         szErrCode;              // Error Code
  1488.       DBIMSG         szContext1;             // Context dependent info
  1489.       DBIMSG         szContext2;             // More context
  1490.       DBIMSG         szContext3;             // Even more context
  1491.       DBIMSG         szContext4;             // Yet some more context
  1492.     } DBIErrInfo;
  1493.  
  1494. typedef DBIErrInfo far *pDBIErrInfo;
  1495.  
  1496. // Error contexts (To be used with DbiGetErrorContext)
  1497.  
  1498. #define    ecTOKEN         1              // Token (For QBE)
  1499. #define    ecTABLENAME     3              // Table name
  1500. #define    ecFIELDNAME     4              // Field Name
  1501. #define    ecIMAGEROW      5              // Image Row (For QBE)
  1502. #define    ecUSERNAME      6              // eg, In lock conflicts, user involved
  1503. #define    ecFILENAME      7              // File Name
  1504. #define    ecINDEXNAME     8              // Index Name
  1505. #define    ecDIRNAME       9              // Directory Name
  1506. #define    ecKEYNAME       10             // Key Name
  1507. #define    ecALIAS         11             // Alias
  1508. #define    ecDRIVENAME     12             // Drive name ('c:')
  1509. #define    ecNATIVECODE    13             // Native error code
  1510. #define    ecNATIVEMSG     14             // Native error message
  1511. #define    ecLINENUMBER    15             // Line Number
  1512. #define    ecCAPABILITY    16             // Capability
  1513. #define    ecCDRNAME       17             // Client Data Repository Name
  1514. #define    ecUSERERRMSG    18             // User Defined error msg
  1515. #define    ecDROBJNAME     19             // Data Repository Object Name
  1516. #define    ecINTERNALLIMIT 20             // Internal limit
  1517.  
  1518. //============================================================================
  1519. //                  Schema info structures
  1520. //============================================================================
  1521. //                    Database descriptor
  1522. //============================================================================
  1523.  
  1524.  
  1525. // DbiOpenDatabaseList
  1526. typedef struct                               // A given Database Description
  1527.    {
  1528.       DBINAME        szName;                 // Logical name (Or alias)
  1529.       DBINAME        szText;                 // Descriptive text
  1530.       DBIPATH        szPhyName;              // Physical name/path
  1531.       DBINAME        szDbType;               // Database type
  1532.    } DBDesc;
  1533. typedef DBDesc far *pDBDesc;
  1534.  
  1535.  
  1536. //============================================================================
  1537. //                    User info descriptor
  1538. //============================================================================
  1539.  
  1540.  
  1541. //DbiOpenUserList()
  1542. typedef struct                               // User description
  1543.    {
  1544.       DBIUSERNAME    szUserName;
  1545.       UINT16         iNetSession;            // Net level session number
  1546.       UINT16         iProductClass;          // Product class of user
  1547.       CHAR           szSerialNum[22];        // Serial number
  1548.    } USERDesc;
  1549. typedef USERDesc far *pUSERDesc;
  1550.  
  1551. //============================================================================
  1552. //                    Table descriptor
  1553. //============================================================================
  1554.  
  1555.  
  1556. // DbiOpenTableList()
  1557. typedef struct                            // Table description (Base)
  1558.    {
  1559.       DBITBLNAME     szName;                 // Table name(No extension or Dir)
  1560.       DBITBLNAME     szFileName;             // File name
  1561.       DBIEXT         szExt;                  // File extension
  1562.       DBINAME        szType;                 // Driver type
  1563.       DBIDATE        dtDate;                 // Date on the table
  1564.       TIME           tmTime;                 // Time on the table
  1565.       UINT32         iSize;                  // Size in bytes
  1566.       BOOL16         bView;                  // If this a view
  1567.       BOOL16         bSynonym;               // If this is a synonym
  1568.    } TBLBaseDesc;
  1569. typedef TBLBaseDesc far *pTBLBaseDesc;
  1570.  
  1571. typedef struct                            // Table description (Extended part)
  1572.    {
  1573.       DBINAME        szStruct;               // Physical structure
  1574.       UINT16         iRestrVersion;          // Version #
  1575.       UINT16         iRecSize;               // Physical record size
  1576.       UINT16         iFields;                // Number of fields
  1577.       UINT16         iIndexes;               // Number Indexes
  1578.       UINT16         iValChecks;             // Number of field validity checks
  1579.       UINT16         iRintChecks;            // Number of ref. integrity checks
  1580.       UINT32         iRecords;               // Number of records in table
  1581.       BOOL16         bProtected;             // If the table is prot
  1582.       BOOL16         bValidInfo;             // Info available for this table
  1583.                                              // FALSE, if all or part of the
  1584.                                              // extended data not available.
  1585.    } TBLExtDesc;
  1586. typedef TBLExtDesc far *pTBLExtDesc;
  1587.  
  1588. typedef struct                            // Table description (Base + Ext)
  1589.    {
  1590.       TBLBaseDesc    tblBase;                // Base      description
  1591.       TBLExtDesc     tblExt;                 // Extended  description
  1592.    } TBLFullDesc;
  1593. typedef TBLFullDesc far *pTBLFullDesc;
  1594.  
  1595. //============================================================================
  1596. //                    File descriptor
  1597. //============================================================================
  1598.  
  1599.  
  1600. // DbiOpenFileList()
  1601. typedef struct                            // File description
  1602.    {
  1603.       DBIPATH        szFileName;             // File name (No Dir or ext)
  1604.       DBIEXT         szExt;                  // Extension
  1605.       BOOL16         bDir;                   // True, if directory
  1606.       UINT32         iSize;                  // File size in bytes
  1607.       DBIDATE        dtDate;                 // Date on the file
  1608.       TIME           tmTime;                 // Time on the file
  1609.    } FILEDesc;
  1610. typedef FILEDesc far *pFILEDesc;
  1611.  
  1612. //======================================================================
  1613. //            Stored Procedure and Stored Procedure Param descriptor
  1614. //======================================================================
  1615.  
  1616. typedef struct {
  1617.       DBISPNAME      szName;
  1618.       DBIDATE        dtDate;
  1619.       TIME           tmTime;
  1620.    } SPDesc;
  1621. typedef SPDesc far *pSPDesc;
  1622.  
  1623. typedef struct {
  1624.       UINT16         uParamNum;
  1625.       DBINAME        szName;
  1626.       STMTParamType  eParamType;
  1627.       UINT16         uFldType;
  1628.       UINT16         uSubType;
  1629.       INT16          iUnits1;
  1630.       INT16          iUnits2;
  1631.       UINT16         uOffset;
  1632.       UINT16         uLen;
  1633.       UINT16         uNullOffset;
  1634.    } SPParamDesc;
  1635. typedef SPParamDesc far *pSPParamDesc;
  1636.  
  1637. //======================================================================
  1638. //            Function and Function Argument Descriptors
  1639. //======================================================================
  1640. typedef enum
  1641.    {
  1642.      fnAVG,
  1643.      fnCOUNT,
  1644.      fnMIN,
  1645.      fnMAX,
  1646.      fnSUM,
  1647.      fnSTDDEV,
  1648.      fnVARIANCE,
  1649.      fnABS,
  1650.      fnCEIL,
  1651.      fnCOS,
  1652.      fnCOSH,
  1653.      fnEXP,
  1654.      fnFLOOR,
  1655.      fnLN,
  1656.      fnLOG,
  1657.      fnMOD,
  1658.      fnPOWER,
  1659.      fnROUND,
  1660.      fnSIGN,
  1661.      fnSIN,
  1662.      fnSINH,
  1663.      fnSQRT,
  1664.      fnTAN,
  1665.      fnTANH,
  1666.      fnTRUNC,
  1667.      fnCHR,
  1668.      fnCONCAT,
  1669.      fnINITCAP,
  1670.      fnLOWER,
  1671.      fnLPAD,
  1672.      fnLTRIM,
  1673.      fnNLS_INITCAP,
  1674.      fnNLS_LOWER,
  1675.      fnNLS_UPPER,
  1676.      fnREPLACE,
  1677.      fnRPAD,
  1678.      fnRTRIM,
  1679.      fnSOUNDEX,
  1680.      fnSUBSTR,
  1681.      fnSUBSTRB,
  1682.      fnTRANSLATE,
  1683.      fnUPPER,
  1684.      fnASCII,
  1685.      fnINSTR,
  1686.      fnINSTRB,
  1687.      fnLENGTH,
  1688.      fnLENGTHB,
  1689.      fnNLSSORT,
  1690.      fnADD_MONTHS,
  1691.      fnLAST_DAY,
  1692.      fnMONTHS_BETWEEN,
  1693.      fnNEW_TIME,
  1694.      fnNEXT_DAY,
  1695.      fnSYSDATE,
  1696.      fnCONVERT,
  1697.      fnTO_CHAR,
  1698.      fnTO_DATE,
  1699.      fnTO_MULTI_BYTE,
  1700.      fnTO_NUMBER,
  1701.      fnTO_SINGLE_BYTE,
  1702.      fnUID,
  1703.      fnUSER,
  1704.      fnORACLEMISC,
  1705.      fnACOS,
  1706.      fnASIN,
  1707.      fnATAN,
  1708.      fnATN2,
  1709.      fnCOT,
  1710.      fnDEGREES,
  1711.      fnLOG10,
  1712.      fnPI,
  1713.      fnRADIANS,
  1714.      fnRAND,
  1715.      fnTEXTPTR,
  1716.      fnTEXTVALID,
  1717.      fnCHARINDEX,
  1718.      fnDIFFERENCE,
  1719.      fnPATINDEX,
  1720.      fnREPLICATE,
  1721.      fnREVERSE,
  1722.      fnRIGHT,
  1723.      fnSPACE,
  1724.      fnSTR,
  1725.      fnSTUFF,
  1726.      fnCOL_NAME,
  1727.      fnCOL_LENGTH,
  1728.      fnDATALENGTH,
  1729.      fnDB_ID,
  1730.      fnDB_NAME,
  1731.      fnHOST_ID,
  1732.      fnHOST_NAME,
  1733.      fnINDEX_COL,
  1734.      fnOBJECT_ID,
  1735.      fnOBJECT_NAME,
  1736.      fnUSER_ID,
  1737.      fnUSER_NAME,
  1738.      fnLEFT,
  1739.      fnLOCATE,
  1740.      fnTRUNCATE,
  1741.      fnCURTIME,
  1742.      fnDAYNAME,
  1743.      fnDAYOFMONTH,
  1744.      fnDAYOFWEEK,
  1745.      fnDAYOFYEAR,
  1746.      fnHOUR,
  1747.      fnMINUTE,
  1748.      fnMONTH,
  1749.      fnMONTHNAME,
  1750.      fnNOW,
  1751.      fnQUARTER,
  1752.      fnSECOND,
  1753.      fnWEEK,
  1754.      fnYEAR,
  1755.  
  1756.    } DBISTDFuncs;
  1757.  
  1758. #define     fnSCALARS_ALLOW_CONSTANTS            0x0001, // fn args may contain refeences to constants
  1759. #define     fnSCALARS_ALLOW_COLUMNS              0x0002, // fn args may contain refeences to columns
  1760. #define     fnSCALARS_ALLOW_PARAMETERS           0x0004, // fn args may contain refeences to parameters
  1761. #define     fnSCALARS_ALLOW_FUNCTIONS            0x0008, // fn args may contain refeences to functions
  1762. #define     fnSCALARS_ALLOW_USER_DEFINED_FUNCS   0x0010, // fn args may contain refeences to user defined functions
  1763. #define     fnSCALARS_ALLOW_SUBQUERIES           0x0020, // fn args can contain subqueries
  1764. #define     fnSCALARS_ALLOW_CORRELATION          0x0040  // fn subqueries can be correlated
  1765.  
  1766. typedef enum
  1767.    {
  1768.    fnListINCL_USER_DEF         = 0x0001   // include user-defined functions
  1769.    } DBIFUNCOpts;
  1770.  
  1771. typedef struct {
  1772.       DBINAME        szName;           // Function name
  1773.       CHAR           szDesc[255];      // Short description
  1774.       UINT16         uOverload;        // Number of function overloads
  1775.       DBISTDFuncs    eStdFn;           // Corresponds to DBI standard function
  1776.    } DBIFUNCDesc;
  1777. typedef DBIFUNCDesc far *pDBIFUNCDesc;
  1778.  
  1779. typedef struct {
  1780.       UINT16         uArgNum;          // Argument position num; 0 for fn return
  1781.       UINT16         uFldType;         // Field type
  1782.       UINT16         uSubType;         // Field subtype (if applicable)
  1783.       UINT16         ufuncFlags;       // Function flags
  1784.    } DBIFUNCArgDesc;
  1785.  
  1786. typedef DBIFUNCArgDesc far *pDBIFUNCArgDesc;
  1787.  
  1788. //============================================================================
  1789. //                   Configuration Info Descriptor
  1790. //============================================================================
  1791.  
  1792. typedef enum
  1793.    {
  1794.      cfgPersistent  = 0,   // Persistent only
  1795.      cfgSession     = 1,   // Session relative only
  1796.      cfgAll         = 2    // All (union)
  1797.    } CFGMode;
  1798.  
  1799.  
  1800. // DbiOpenCfgInfoList()
  1801. typedef struct                            // Config description
  1802.    {
  1803.       DBINAME        szNodeName;                // Node name
  1804.       CHAR           szDescription[DBIMAXSCFLDLEN]; // Node description
  1805.       UINT16         iDataType;                 // Value type
  1806.       CHAR           szValue[DBIMAXSCFLDLEN];   // Value
  1807.       BOOL16         bHasSubnodes;              // True, if not leaf node
  1808.    } CFGDesc;
  1809. typedef CFGDesc far *pCFGDesc;
  1810.  
  1811.  
  1812. //============================================================================
  1813. //                    Family descriptor
  1814. //============================================================================
  1815.  
  1816.  
  1817. typedef enum                              // Family member types
  1818.    {
  1819.       fmlUNKNOWN     = 0,
  1820.       fmlTABLE       = 1,
  1821.       fmlINDEX       = 2,
  1822.       fmlFORM        = 3,
  1823.       fmlREPORT      = 4,
  1824.       fmlVALCHECK    = 5,
  1825.       fmlSECINDEX    = 6,
  1826.       fmlSECINDEX2   = 7,
  1827.       fmlBLOBFILE    = 8
  1828.    } FMLType;
  1829. typedef FMLType far *pFMLType;
  1830.  
  1831. // DbiOpenFamilyList()
  1832. typedef struct {                          // Family record structure
  1833.       DBINAME        szName;                 // Member name (documentary)
  1834.       UINT16         iId;                    // Id (if applicable)
  1835.       FMLType        eType;                  // Member type
  1836.       DBIPATH        szFileName;             // File name of member
  1837.    } FMLDesc;
  1838. typedef FMLDesc far *pFMLDesc;
  1839.  
  1840.  
  1841. //============================================================================
  1842. //                    Language driver descriptor
  1843. //============================================================================
  1844.  
  1845.  
  1846. #define DBIOEM_CP                    1      // (dos)
  1847. #define DBIANSI_CP                   2      // (win)
  1848. #define DBIOS2_CP                    3
  1849. /* UNIX etc. */
  1850. #define DBISUNOS_CP                  4
  1851. #define DBIVMS_CP                    5
  1852. #define DBIHPUX_CP                   6
  1853. #define DBIULTRIX_CP                 7
  1854. #define DBIAIX_CP                    8
  1855. #define DBIAUX_CP                    9
  1856. #define DBIXENIX_CP                 10
  1857. #define DBIMAC_CP                   11
  1858. #define DBINEXT_CP                  12
  1859.  
  1860. // DbiOpenLdList()
  1861. typedef struct                         // Lang Driver description
  1862.    {
  1863.       DBINAME        szName;               // Driver symbolic name
  1864.       DBINAME        szDesc;               // Description
  1865.       UINT16         iCodePage;
  1866.       UINT16         PrimaryCpPlatform;
  1867.       UINT16         AlternateCpPlatform;
  1868.    } LDDesc;
  1869. typedef LDDesc far *pLDDesc;
  1870.  
  1871. //============================================================================
  1872. //                    Lock descriptor
  1873. //============================================================================
  1874.  
  1875. // Lock types in LOCKDesc:
  1876.  
  1877. #define lckRECLOCK         0                    // Normal Record lock (Write)
  1878. #define lckRRECLOCK        1                    // Special Pdox Record lock (Read)
  1879. #define lckGROUPLOCK       2                    // Pdox Group lock
  1880. #define lckIMGAREA         3                    // Pdox Image area
  1881. #define lckTABLEREG        4                    // Table registration/Open (No lock)
  1882. #define lckTABLEREAD       5                    // Table Read lock
  1883. #define lckTABLEWRITE      6                    // Table Write lock
  1884. #define lckTABLEEXCL       7                    // Table Exclusive lock
  1885. #define lckUNKNOWN         9                    // Unknown lock
  1886.  
  1887.  
  1888. // DbiOpenLockList()
  1889. typedef struct                               // Lock Description
  1890.    {
  1891.       UINT16         iType;                     // Lock type (0 for rec lock)
  1892.       DBIUSERNAME    szUserName;                // Lock owner
  1893.       UINT16         iNetSession;               // Net level Session number
  1894.       UINT16         iSession;                  // Idapi session#, if our lock
  1895.       UINT32         iRecNum;                   // If a record lock
  1896.       UINT16         iInfo;                     // Info for table locks
  1897.    } LOCKDesc;
  1898. typedef LOCKDesc far *pLOCKDesc;
  1899.  
  1900. //============================================================================
  1901. //                    Filter description
  1902. //============================================================================
  1903.  
  1904. typedef enum {
  1905.  
  1906.       // Relational operators.
  1907.  
  1908.       canNOTDEFINED        = 0,        //                                  (*)
  1909.       canISBLANK,                      // CANUnary;  is operand blank.     (*)
  1910.       canNOTBLANK,                     // CANUnary;  is operand not blank. (*)
  1911.  
  1912.       canEQ,                           // CANBinary, CANCompare; equal.                (*)
  1913.       canNE,                           // CANBinary; NOT equal.            (*)
  1914.       canGT,                           // CANBinary; greater than.         (*)
  1915.       canLT,                           // CANBinary; less than.            (*)
  1916.       canGE,                           // CANBinary; greater or equal.     (*)
  1917.       canLE,                           // CANBinary; less or equal.        (*)
  1918.  
  1919.       // Logical operators.
  1920.  
  1921.       canNOT,                          // CANUnary; NOT                    (*)
  1922.       canAND,                          // CANBinary; AND                   (*)
  1923.       canOR,                           // CANBinary; OR                    (*)
  1924.  
  1925.       // Operators identifing leaf operands.
  1926.  
  1927.       canTUPLE,                        // CANUnary; Entire record is operand.
  1928.       canFIELD,                        // CANUnary; operand is field       (*)
  1929.       canCONST,                        // CANUnary; operand is constant    (*)
  1930.  
  1931.       // Arithmetic operators.
  1932.  
  1933.       canMINUS,                        // CANUnary;  minus.
  1934.       canADD,                          // CANBinary; addition.
  1935.       canSUB,                          // CANBinary; subtraction.
  1936.       canMUL,                          // CANBinary; multiplication.
  1937.       canDIV,                          // CANBinary; division.
  1938.       canMOD,                          // CANBinary; modulo division.
  1939.       canREM,                          // CANBinary; remainder of division.
  1940.  
  1941.       // Aggregate type operators.
  1942.  
  1943.       canSUM,                          // CANBinary, accumulate sum of.
  1944.       canCOUNT,                        // CANBinary, accumulate count of.
  1945.       canMIN,                          // CANBinary, find minimum of.
  1946.       canMAX,                          // CANBinary, find maximum of.
  1947.       canAVG,                          // CANBinary, find average of.
  1948.  
  1949.       // Miscellaneous operators.
  1950.  
  1951.       canCONT,                         // CANBinary; provides a link between two
  1952.                                        // expression subtrees of a tree.
  1953.       canUDF,                          // CANBinary; invokes a User defined fn
  1954.  
  1955.       canCONTINUE,                     // CANUnary; Stops evaluating records
  1956.                                        // when operand evaluates to false (forward sequential access only)
  1957.  
  1958.       canLIKE                          // CANCompare, extended binary compare       (*)
  1959.  
  1960.    } CANOp;
  1961.  
  1962. typedef CANOp far *pCANOp;
  1963.  
  1964. typedef enum {                      // Node Class
  1965.  
  1966.       nodeNULL          = 0,           // Null node                  (*)
  1967.       nodeUNARY,                       // Node is a unary            (*)
  1968.       nodeBINARY,                      // Node is a binary           (*)
  1969.       nodeCOMPARE,                     // Node is a compare          (*)
  1970.       nodeFIELD,                       // Node is a field            (*)
  1971.       nodeCONST,                       // Node is a constant         (*)
  1972.       nodeTUPLE,                       // Node is a record
  1973.       nodeCONTINUE,                    // Node is a continue node    (*)
  1974.       nodeUDF                          // Node is a UDF node
  1975.    } NODEClass;
  1976.  
  1977. // NODE definitions including misc data structures
  1978. //-------------------------------------------------
  1979.  
  1980. typedef struct {                    // Header part common to all     (*)
  1981.       NODEClass      nodeClass;
  1982.       CANOp          canOp;
  1983.    } CANHdr;
  1984. typedef CANHdr far *pCANHdr;
  1985.  
  1986. typedef struct {                    // Unary Node                    (*)
  1987.       NODEClass      nodeClass;
  1988.       CANOp          canOp;
  1989.       UINT16         iOperand1;        // Byte offset of Operand node
  1990.    } CANUnary;
  1991. typedef CANUnary far * pCANUnary;
  1992.  
  1993. typedef struct {                    // Binary Node                   (*)
  1994.       NODEClass      nodeClass;
  1995.       CANOp          canOp;
  1996.       UINT16         iOperand1;        // Byte offset of Op1
  1997.       UINT16         iOperand2;        // Byte offset of Op2
  1998.    } CANBinary;
  1999. typedef CANBinary far * pCANBinary;
  2000.  
  2001. typedef struct {                    // Field
  2002.       NODEClass      nodeClass;
  2003.       CANOp          canOp;
  2004.       UINT16         iFieldNum;
  2005.       UINT16         iNameOffset;      // Name offset in Literal pool
  2006.    } CANField;
  2007. typedef CANField far * pCANField;
  2008.  
  2009. typedef struct {                    // Constant
  2010.       NODEClass      nodeClass;
  2011.       CANOp          canOp;
  2012.       UINT16         iType;            // Constant type.
  2013.       UINT16         iSize;            // Constant size. (in bytes)
  2014.       UINT16         iOffset;          // Offset in the literal pool.
  2015.    } CANConst;
  2016. typedef CANConst far * pCANConst;
  2017.  
  2018. typedef struct {                    // Tuple (record)
  2019.       NODEClass      nodeClass;
  2020.       CANOp          canOp;
  2021.       UINT16         iSize;            // Record size. (in bytes)
  2022.    } CANTuple;
  2023. typedef CANTuple far * pCANTuple;
  2024.  
  2025. typedef struct {                    // Break Node                    (*)
  2026.       NODEClass      nodeClass;
  2027.       CANOp          canOp;
  2028.       UINT16         iContOperand;     // Continue if operand is true.
  2029.                                        // else stop evaluating records.
  2030.    } CANContinue;
  2031. typedef CANContinue far * pCANContinue;
  2032.  
  2033. typedef struct {                    // Extended compare Node (text fields) (*)
  2034.       NODEClass      nodeClass;
  2035.       CANOp          canOp;               // canLIKE, canEQ
  2036.       BOOL16         bCaseInsensitive;    // 3 val: UNKNOWN = "fastest", "native"
  2037.       UINT16         iPartialLen;         // Partial fieldlength (0 is full length)
  2038.       UINT16         iOperand1;           // Byte offset of Op1
  2039.       UINT16         iOperand2;           // Byte offset of Op2
  2040.    } CANCompare;
  2041. typedef CANCompare far * pCANCompare;
  2042.  
  2043.  
  2044. //This is the node to be used to pass User defined functions
  2045. #define iLangSQL     0              // Common SQL dialect
  2046. #define iDbaseExpr   2              // This is also the driver ID for dBASE
  2047.  
  2048. typedef struct {                    // A user defined function
  2049.       NODEClass      nodeClass;
  2050.       CANOp          canOp;
  2051.  
  2052.       UINT16         iOffSzFuncName;   // Offset in literal pool to Function Name string(0 terminated)
  2053.  
  2054.       UINT16         iOperands;        // Byte offset of Operands (concatenated using canCONT)
  2055.  
  2056.       //The fields below are hints that specific drivers can make use of
  2057.       UINT16         iDrvDialect;      // Driver Dialect ID for UDF string supplied
  2058.       UINT16         iOffSzUDF;        // Offset in literal pool to UDF string (0 terminated)
  2059.    } CANUdf;
  2060. typedef CANUdf far * pCANUdf;
  2061.  
  2062. #if !defined(MIDL)
  2063. typedef union {
  2064.       CANHdr         canHdr;
  2065.       CANUnary       canUnary;
  2066.       CANBinary      canBinary;
  2067.       CANField       canField;
  2068.       CANConst       canConst;
  2069.       CANTuple       canTuple;
  2070.       CANContinue    canContinue;
  2071.       CANCompare     canCompare;
  2072.    } CANNode;
  2073. typedef CANNode far *pCANNode;
  2074. #endif // !defined(MIDL)
  2075.  
  2076. // Linear exression tree
  2077. //----------------------
  2078.  
  2079. # define CANEXPRVERSION   2
  2080.  
  2081. typedef struct {                    // Expression Tree
  2082.       UINT16         iVer;             // Version tag of expression.
  2083.       UINT16         iTotalSize;       // Size of this structure
  2084.       UINT16         iNodes;           // Number of nodes
  2085.       UINT16         iNodeStart;       // Starting offet of Nodes in this
  2086.       UINT16         iLiteralStart;    // Starting offset of Literals in this
  2087.       // Nodes and Literals are here
  2088.    } CANExpr;
  2089. typedef CANExpr far * pCANExpr;
  2090. typedef pCANExpr far *ppCANExpr;
  2091.  
  2092.  
  2093. //pfGENFilter returns TRUE, FALSE or ABORT
  2094. #define ABORT     -2
  2095.  
  2096. #if !defined(MIDL)
  2097. typedef INT16 (DBIFN * pfGENFilter)
  2098.    (
  2099.       UINT32            ulClientData,
  2100.       pBYTE             pRecBuf,
  2101.       UINT32            iPhyRecNum
  2102.    ) ;
  2103. #endif // !defined(MIDL)
  2104.  
  2105. typedef UINT32 hDBIFilter ;
  2106. typedef hDBIFilter far *phDBIFilter ;
  2107.  
  2108.  
  2109. #if !defined(MIDL)
  2110. typedef struct
  2111.    {
  2112.       UINT16          iFilterId;    // Id for filter
  2113.       hDBIFilter      hFilter;      // Filter handle
  2114.       UINT32          iClientData;  // Client supplied data
  2115.       UINT16          iPriority;    // 1..N with 1 being highest
  2116.       BOOL16          bCanAbort;    // TRUE : pfFilter can return ABORT
  2117.       pfGENFilter     pfFilter;     // Client filter function
  2118.       pVOID           pCanExpr;     // Supplied expression
  2119.       BOOL16          bActive ;     // TRUE : filter is active
  2120.    } FILTERInfo;
  2121. typedef FILTERInfo far *pFILTERInfo;
  2122. #endif // !defined(MIDL)
  2123.  
  2124. #ifndef NODBIQBE
  2125.  
  2126. //---------------------------------------------------------------------------
  2127. //   DBI Query related types
  2128. //---------------------------------------------------------------------------
  2129.  
  2130. #define MAXQBEEXPRSIZE  300             // size of one QBE expr
  2131.  
  2132.  
  2133. typedef struct  _DBIQryProp
  2134. {
  2135.    DBINAME    szQryName;       // Name of query
  2136.    DBIQryLang eLang;           // Language
  2137.    INT16      iQryPrice;       // Query price 1..100 (1 = cheap, 100 = expensive)
  2138.    INT16      iNumTables;      // Number of tables in join.  0 = unknown.
  2139.    BOOL16     bHasAnswer;
  2140.    BOOL16     bInsert;
  2141.    BOOL16     bDelete;
  2142.    BOOL16     bChange;
  2143. }  DBIQryProp, far *pDBIQryProp;
  2144.  
  2145.  
  2146. #define DBIQBE_ANSWERBIT    (0x1)    // Answer table bit flag
  2147. #define DBIQBE_INSERTEDBIT  (0x2)    // Inserted table bit flag
  2148. #define DBIQBE_DELETEDBIT   (0x4)    // Deleted table bit flag
  2149. #define DBIQBE_CHANGEDBIT   (0x8)    // Changed table bit flag
  2150. #define DBIQBE_ERRORINSBIT  (0x10)   // Error inserted table bit flag
  2151. #define DBIQBE_ERRORDELBIT  (0x20)   // Error deleted table bit flag
  2152. #define DBIQBE_ERRORCHGBIT  (0x40)   // Error changed table bit flag
  2153.  
  2154.  
  2155. // answer cursor properties:
  2156.  
  2157. #define bAnsHasLiveFields  0x1
  2158. #define bAnsHasFilter      0x2
  2159. #define bAnsHasFieldMap    0x4
  2160. #define bAnsHasCalcField   0x8
  2161. #define bAnsHasLiveBlob    0x10
  2162.  
  2163. // answer field properties:
  2164.  
  2165. #define bIsAnsFieldLive    0x1
  2166.  
  2167.  
  2168.  
  2169. typedef enum
  2170. {
  2171.    dbiqryDEFAULT = 0,
  2172.    dbiqryDIRTY   = 1,
  2173.    dbiqryCLEAN   = 2,
  2174.    dbiqryRESTART = 3
  2175. } DBIQryType, far *pDBIQryType;
  2176.  
  2177.  
  2178. //---------------------------------------------------------------------------
  2179. typedef struct
  2180. {
  2181.    UINT16    stepsInQry;      // Total steps in query.
  2182.    UINT16    stepsCompleted;  // Steps completed out of total (steps may be skipped).
  2183.    UINT32    totElemInStep;   // Total elements in current step.
  2184.    UINT32    elemCompleted;   // Elements completed in current step.
  2185. } DBIQryProgress, far *pDBIQryProgress;
  2186.  
  2187.  
  2188. typedef enum
  2189. {
  2190.    qryModeNONE     = 0,       // Reserved
  2191.    qryModeLOCAL    = 1,
  2192.    qryModeSERVER   = 2,
  2193.    qryModeEITHER   = 3,
  2194.    qryModeNOWLOCAL = 4        // used only in call back, when failed on server
  2195. } QryEvalMode;
  2196.  
  2197.  
  2198. // values for client indicating live/canned preference about query execution
  2199. typedef enum
  2200. {
  2201.    wantDEFAULT     = 0,        // Default , same as wantCANNED
  2202.    wantLIVE        = 1,        // Want live data even if extra effort (no guarantee)
  2203.    wantCANNED      = 2,        // Want canned data even if extra effort (guaranteed)
  2204.    wantSPEED       = 3         // Let query manager decide, find out afterwards
  2205. } LIVENESS;
  2206.  
  2207.  
  2208. typedef struct
  2209. {
  2210.    INT16       length;        // Length in bytes of this structure
  2211.    BOOL16      blankzeroes;   // TRUE if blanks to be regarded as zeros
  2212.    FMTDate     dateFormat;    // Date format
  2213.    FMTNumber   numberFormat;  // Number format
  2214.    BOOL16      bNeedAuxTbls;  // If FALSE, don't bother with DELETED/ERRDEL, etc.
  2215.    QryEvalMode qryMode;       // qryModeSERVER, qryModeLOCAL or qryModeEITHER.
  2216.    BOOL16      perQrySqlMode;
  2217.    LIVENESS    livenessDesired;
  2218. } QueryLowProps, far *pQueryLowProps;
  2219.  
  2220. #endif  // NODBIQBE
  2221.  
  2222. #endif  // NODBITYPES
  2223.  
  2224. #ifndef NODBISYMBOLS
  2225. //=======================================================================================
  2226. //                      DBI symbols
  2227. //=======================================================================================
  2228.  
  2229. # define DBIMOD_BEGIN         (0x3F00U)
  2230.  
  2231. # define DBIMOD_QBE           (DBIMOD_BEGIN + 1)
  2232. # define DBIMOD_SQLG          (DBIMOD_BEGIN + 2)
  2233. # define DBIMOD_LEGO          (DBIMOD_BEGIN + 3)
  2234. # define DBIMOD_LOCKMNGR      (DBIMOD_BEGIN + 4)
  2235. # define DBIMOD_SQLDRIVER     (DBIMOD_BEGIN + 5)
  2236. # define DBIMOD_OS            (DBIMOD_BEGIN + 6)
  2237. # define DBIMOD_DBASEDRV      (DBIMOD_BEGIN + 7)
  2238. # define DBIMOD_CDR           (DBIMOD_BEGIN + 8)
  2239.  
  2240. # define DBIMOD_END           (DBIMOD_BEGIN + 9)
  2241.  
  2242. //---------------------------------------------------------------------------
  2243.  
  2244. # define DBISYM_BEGIN         (DBIMOD_END + 1)
  2245.  
  2246. # define DBISYM_TOKEN         (DBISYM_BEGIN + ecTOKEN)
  2247. # define DBISYM_TABLENAME     (DBISYM_BEGIN + ecTABLENAME)
  2248. # define DBISYM_FIELDNAME     (DBISYM_BEGIN + ecFIELDNAME)
  2249. # define DBISYM_IMAGEROW      (DBISYM_BEGIN + ecIMAGEROW)
  2250. # define DBISYM_USERNAME      (DBISYM_BEGIN + ecUSERNAME)
  2251. # define DBISYM_FILENAME      (DBISYM_BEGIN + ecFILENAME)
  2252. # define DBISYM_INDEXNAME     (DBISYM_BEGIN + ecINDEXNAME)
  2253. # define DBISYM_DIRNAME       (DBISYM_BEGIN + ecDIRNAME)
  2254. # define DBISYM_KEYNAME       (DBISYM_BEGIN + ecKEYNAME)
  2255. # define DBISYM_ALIAS         (DBISYM_BEGIN + ecALIAS)
  2256. # define DBISYM_DRIVENAME     (DBISYM_BEGIN + ecDRIVENAME)
  2257. # define DBISYM_NATIVECODE    (DBISYM_BEGIN + ecNATIVECODE)
  2258. # define DBISYM_NATIVEMSG     (DBISYM_BEGIN + ecNATIVEMSG)
  2259. # define DBISYM_LINENUMBER    (DBISYM_BEGIN + ecLINENUMBER)
  2260. # define DBISYM_CAPABILITY    (DBISYM_BEGIN + ecCAPABILITY)
  2261. # define DBISYM_CDRNAME       (DBISYM_BEGIN + ecCDRNAME)
  2262. # define DBISYM_USERERRMSG    (DBISYM_BEGIN + ecUSERERRMSG)
  2263. # define DBISYM_DROBJNAME     (DBISYM_BEGIN + ecDROBJNAME)
  2264. # define DBISYM_INTERNALLIMIT (DBISYM_BEGIN + ecINTERNALLIMIT)
  2265.  
  2266. # define DBISYM_BASEEND       (DBISYM_BEGIN + 100)
  2267.  
  2268. //-----------------------------------------------------------------------------
  2269.  
  2270. # define DBISYM_MISC          (DBISYM_BASEEND + 1)
  2271.  
  2272. # define DBISYM_WORK          (DBISYM_MISC + 1)
  2273. # define DBISYM_PRIV          (DBISYM_MISC + 2)
  2274. # define DBISYM_COPY          (DBISYM_MISC + 3)
  2275. # define DBISYM_APPEND        (DBISYM_MISC + 4)
  2276. # define DBISYM_TXTPROBFLD1   (DBISYM_MISC + 5)
  2277. # define DBISYM_TXTPROBFLD2   (DBISYM_MISC + 6)
  2278. # define DBISYM_TXTPROBFLD3   (DBISYM_MISC + 7)
  2279.  
  2280. # define DBISYM_END           (DBIMOD_BEGIN + 0x3FFF)
  2281.  
  2282.  
  2283.  
  2284. //=======================================================================================
  2285. //                      DBI Config symbols
  2286. //=======================================================================================
  2287.  
  2288.  
  2289.  
  2290. // Categories
  2291.  
  2292. #define szCFGSYSTEM        "SYSTEM"
  2293. #define szCFGDRIVER        "DRIVERS"
  2294. #define szCFGDATABASE      "DATABASES"
  2295. #define szCFGREPOSITORY    "REPOSITORIES"
  2296.  
  2297. //--------------------------------------------------------------------------
  2298. // System Fields
  2299. //--------------------------------------------------------------------------
  2300.  
  2301. #define szCFGSYSVERSION       "VERSION"
  2302. #define szCFGSYSNETTYPE       "NET TYPE"
  2303. #define szCFGSYSNETDIR        "NET DIR"
  2304. #define szCFGSYSLOCALSHARE    "LOCAL SHARE"
  2305. #define szCFGSYSLANGDRV       "LANGDRIVER"
  2306. #define szCFGSYSLANGDRVDIR    "LANGDRVDIR"
  2307. #define szCFGSYSMINBUF        "MINBUFSIZE"
  2308. #define szCFGSYSMAXBUF        "MAXBUFSIZE"
  2309. #define szCFGSYSLOCKRETRY     "LOCKRETRY"
  2310. #define szCFGSYSFLAGS         "SYSFLAGS"
  2311. #define szCFGMAXFILEHANDLES   "MAXFILEHANDLES"
  2312. #define szCFGSQLQRYMODE       "SQLQRYMODE"
  2313. #define szCFGLOWMEMLIMIT      "LOW MEMORY USAGE LIMIT"  // Use this instead of NOLOWMEMBUF
  2314. #define szCFGSYSODBCCFGIMPORT "AUTO ODBC"
  2315. #define szCFGAUTOODBC         "AUTO ODBC"
  2316. #define szCFGDEFDRV           "DEFAULT DRIVER"
  2317. #define szCFGSYSLOCALREPOSITORY "DATA REPOSITORY"
  2318. //#define szCFGSYSCOMMONREPOSITORY "COMMON REPOSITORY"
  2319. #define szCFGSYSSHAREDMEMSIZE      "SHAREDMEMSIZE"
  2320. #define szCFGSYSSHAREDMEMLOCATION  "SHAREDMEMLOCATION"
  2321.  
  2322.  
  2323. //--------------------------------------------------------------------------
  2324. // Driver Fields
  2325. //--------------------------------------------------------------------------
  2326.  
  2327. #define szCFGDRVVERSION       "VERSION"
  2328. #define szCFGDRVTYPE          "TYPE"
  2329. #define szCFGDRVDLL           "DLL"
  2330. #define szCFGDRVDLL32         "DLL32"
  2331. #define szCFGDRVFLAGS         "DRIVER FLAGS"
  2332. #define szCFGDRVLANGDRIVER    "LANGDRIVER"
  2333. #define szCFGDRVFILLFACTOR    "FILL FACTOR"
  2334. #define szCFGDRVBLOCKSIZE     "BLOCK SIZE"
  2335. #define szCFGDRVLOCKPROTOCOL  "LOCKPROTOCOL"
  2336. #define szCFGDRVLEVEL         "LEVEL"
  2337. #define szCFGDRVVENDINIT      "VENDOR INIT"
  2338. #define szCFGDRVTRACEMODE     "TRACE MODE"
  2339.  
  2340. //--------------------------------------------------------------------------
  2341. // Dbase Driver fields
  2342. //--------------------------------------------------------------------------
  2343.  
  2344. #define szCFGDRVMEMOBLOCKSIZE "MEMO FILE BLOCK SIZE"
  2345. #define szCFGDRVMDXBLOCKSIZE  "MDX BLOCK SIZE"
  2346.  
  2347.  
  2348. //--------------------------------------------------------------------------
  2349. // Driver Nodes
  2350. //--------------------------------------------------------------------------
  2351.  
  2352. #define szCFGDRVINIT         "INIT"
  2353. #define szCFGDBCREATE        "DB CREATE"
  2354. #define szCFGDBOPEN          "DB OPEN"
  2355. #define szCFGTBLCREATE       "TABLE CREATE"
  2356. #define szCFGTBLOPEN         "TABLE OPEN"
  2357.  
  2358. //--------------------------------------------------------------------------
  2359. // Database Nodes
  2360. //--------------------------------------------------------------------------
  2361.  
  2362. #define szCFGDBINFO          "DB INFO"
  2363.  
  2364. //--------------------------------------------------------------------------
  2365. // Database fields
  2366. //--------------------------------------------------------------------------
  2367.  
  2368. #define szCFGDBTYPE          "TYPE"
  2369. #define szCFGDBPATH          "PATH"
  2370. #define szCFGDBDEFAULTDRIVER "DEFAULT DRIVER"
  2371. #define szCFGDBENABLEBCD     "ENABLE BCD"
  2372.  
  2373. //--------------------------------------------------------------------------
  2374. // Others
  2375. //--------------------------------------------------------------------------
  2376.  
  2377. #define szCFGINIT            "INIT"
  2378. #define szTYPE               "TYPE"
  2379. #define szCFGDBSTANDARD      "STANDARD"
  2380. #define szCFGTRUE            "TRUE"
  2381. #define szCFGFALSE           "FALSE"
  2382. #define szOPENMODE           "OPEN MODE"
  2383. #define szREADWRITE          "READ/WRITE"
  2384. #define szREADONLY           "READ ONLY"
  2385. #define szSHAREMODE          "SHARE MODE"
  2386. #define szEXCLUSIVE          "EXCLUSIVE"
  2387. #define szSHARED             "SHARED"
  2388. #define szUSERNAME           "USER NAME"
  2389. #define szSERVERNAME         "SERVER NAME"
  2390. #define szDATABASENAME       "DATABASE NAME"
  2391. #define szSCHEMASIZE         "SCHEMA CACHE SIZE"
  2392. #define szCFGSTRICTINTEGRITY "STRICTINTEGRTY"
  2393. #define szSQLPASSMODE        "SQLPASSTHRU MODE"
  2394. #define szNOTSHARED          "NOT SHARED"
  2395. #define szSHAREDAUTOCOMMIT   "SHARED AUTOCOMMIT"
  2396. #define szSHAREDNOAUTOCOMMIT "SHARED NOAUTOCOMMIT"
  2397. #define szSCHEMATIME         "SCHEMA CACHE TIME"
  2398. #define szMAXQUERYTIME       "MAX QUERY TIME"
  2399. #define szMAXROWS            "MAX ROWS"
  2400. #define szLISTSYNONYMS       "LIST SYNONYMS"
  2401. #define szSYNNONE            "NONE"
  2402. #define szSYNALL             "ALL"
  2403. #define szSYNPRIVATE         "PRIVATE"
  2404. #define szBATCHCOUNT         "BATCH COUNT"
  2405. #define szENABLESCHEMACACHE  "ENABLE SCHEMA CACHE"
  2406. #define szSCHEMACACHEDIR     "SCHEMA CACHE DIR"
  2407. #define szSYBLHOST          "HOST NAME"
  2408. #define szSYBLAPP           "APPLICATION NAME"
  2409. #define szSYBLNATLANG       "NATIONAL LANG NAME"
  2410. #define szTDSPACKETSIZE      "TDS PACKET SIZE"
  2411. #define szORAINTEGER         "ENABLE INTEGERS"
  2412. #define szDBNLS              "DBNLS"
  2413. #define szCOLLCHAR           "COLLCHAR"
  2414. #define szROWSETSIZE          "ROWSET SIZE"
  2415.  
  2416. //--------------------------------------------------------------------------
  2417. // Repository fields
  2418. //--------------------------------------------------------------------------
  2419.  
  2420. #define szCFGDRDBNAME        "DATABASE NAME"
  2421. #define szCFGDRTBLNAME       "TABLE NAME"
  2422. #define szCFGDRLANGDRIVER    "LANGUAGE DRIVER"
  2423. #define szCFGDRDESC          "DESCRIPTION"
  2424.  
  2425.  
  2426. //--------------------------------------------------------------------------
  2427. // SYSTEM DATE/TIME/NUMBER FORMATS
  2428. // SYSTEM nodes:
  2429. //--------------------------------------------------------------------------
  2430. #define  szCFGFORMAT          "FORMATS"
  2431.  
  2432. //--------------------------------------------------------------------------
  2433. // Format nodes:
  2434. //--------------------------------------------------------------------------
  2435. #define  szCFGDATE           "DATE"
  2436. #define  szCFGTIME           "TIME"
  2437. #define  szCFGNUMBER         "NUMBER"
  2438.  
  2439. //--------------------------------------------------------------------------
  2440. // DATE and/or TIME fields:
  2441. //--------------------------------------------------------------------------
  2442. #define szCFGSEPARATOR        "SEPARATOR"
  2443. #define szCFGMODE             "MODE"
  2444. #define szCFGFOURDIGITYEAR    "FOURDIGITYEAR"
  2445. #define szCFGYEARBIASED       "YEARBIASED"
  2446. #define szCFGLEADINGZEROM     "LEADINGZEROM"
  2447. #define szCFGLEADINGZEROD     "LEADINGZEROD"
  2448. #define szCFGTWELVEHOUR       "TWELVEHOUR"
  2449. #define szCFGAMSTRING         "AMSTRING"
  2450. #define szCFGPMSTRING         "PMSTRING"
  2451. #define szCFGSECONDS          "SECONDS"
  2452. #define szCFGMILSECONDS       "MILSECONDS"
  2453.  
  2454. //--------------------------------------------------------------------------
  2455. // Number fields:
  2456. //--------------------------------------------------------------------------
  2457. #define szCFGDECIMALSEPARATOR    "DECIMALSEPARATOR"
  2458. #define szCFGTHOUSANDSEPARATOR   "THOUSANDSEPARATOR"
  2459. #define szCFGDECIMALDIGITS       "DECIMALDIGITS"
  2460. #define szCFGLEADINGZERON        "LEADINGZERON"
  2461.  
  2462.  
  2463.  
  2464. // String resoure id's for each string listed above
  2465.  
  2466. #define   DBICFG_BASE              0x3A00
  2467.  
  2468. //--------------------------------------------------------------------------
  2469. // Categories
  2470. //--------------------------------------------------------------------------
  2471. #define iCFGSYSTEM               (DBICFG_BASE + 1)
  2472. #define iCFGDRIVER               (DBICFG_BASE + 2)
  2473. #define iCFGDATABASE             (DBICFG_BASE + 3)
  2474. #define iCFGREPOSITORY           (DBICFG_BASE + 210)
  2475.  
  2476. //--------------------------------------------------------------------------
  2477. // System Fields
  2478. //--------------------------------------------------------------------------
  2479. #define iCFGSYSVERSION           (DBICFG_BASE + 5)
  2480. #define iCFGSYSNETTYPE           (DBICFG_BASE + 6)
  2481. #define iCFGSYSNETDIR            (DBICFG_BASE + 7)
  2482. #define iCFGSYSLOCALSHARE        (DBICFG_BASE + 8)
  2483. #define iCFGSYSLANGDRV           (DBICFG_BASE + 9)
  2484. #define iCFGSYSLANGDRVDIR        (DBICFG_BASE + 10)
  2485. #define iCFGSYSMINBUF            (DBICFG_BASE + 11)
  2486. #define iCFGSYSMAXBUF            (DBICFG_BASE + 12)
  2487. #define iCFGSYSLOCKRETRY         (DBICFG_BASE + 13)
  2488. #define iCFGSYSFLAGS             (DBICFG_BASE + 14)
  2489. #define iCFGMAXFILEHANDLES       (DBICFG_BASE + 15)
  2490. #define iCFGSQLQRYMODE           (DBICFG_BASE + 16)
  2491. #define iCFGLOWMEMLIMIT          (DBICFG_BASE + 17)
  2492. #define iCFGSYSODBCCFGIMPORT     (DBICFG_BASE + 18)
  2493. #define iCFGSYSLOCALREPOSITORY   (DBICFG_BASE + 211)
  2494. //#define iCFGSYSCOMMONREPOSITORY  (DBICFG_BASE + 212)
  2495. #define iCFGSYSSHAREDMEMSIZE     (DBICFG_BASE + 250)
  2496. #define iCFGSYSSHAREDMEMLOCATION (DBICFG_BASE + 251)
  2497.  
  2498.  
  2499.  
  2500. //--------------------------------------------------------------------------
  2501. // Driver Fields
  2502. //--------------------------------------------------------------------------
  2503. #define iCFGDRVVERSION           (DBICFG_BASE + 20)
  2504. #define iCFGDRVTYPE              (DBICFG_BASE + 21)
  2505. #define iCFGDRVLANGDRIVER        (DBICFG_BASE + 22)
  2506. #define iCFGDRVFILLFACTOR        (DBICFG_BASE + 23)
  2507. #define iCFGDRVBLOCKSIZE         (DBICFG_BASE + 24)
  2508. #define iCFGDRVLOCKPROTOCOL      (DBICFG_BASE + 25)
  2509. #define iCFGDRVLEVEL             (DBICFG_BASE + 26)
  2510. #define iCFGDRVFLAGS             (DBICFG_BASE + 27)
  2511. #define iCFGDRVTRACEMODE         (DBICFG_BASE + 28)
  2512.  
  2513. //--------------------------------------------------------------------------
  2514. // Dbase Driver fields
  2515. //--------------------------------------------------------------------------
  2516. #define iCFGDRVMEMOBLOCKSIZE     (DBICFG_BASE + 30 )
  2517. #define iCFGDRVMDXBLOCKSIZE      (DBICFG_BASE + 31 )
  2518.  
  2519.  
  2520. //--------------------------------------------------------------------------
  2521. // Driver Nodes
  2522. //--------------------------------------------------------------------------
  2523. #define iCFGDRVINIT              (DBICFG_BASE + 40 )
  2524. #define iCFGDBCREATE             (DBICFG_BASE + 41 )
  2525. #define iCFGDBOPEN               (DBICFG_BASE + 42 )
  2526. #define iCFGTBLCREATE            (DBICFG_BASE + 43 )
  2527. #define iCFGTBLOPEN              (DBICFG_BASE + 44 )
  2528.  
  2529. //--------------------------------------------------------------------------
  2530. // Database Nodes
  2531. //--------------------------------------------------------------------------
  2532. #define iCFGDBINFO               (DBICFG_BASE + 50 )
  2533.  
  2534. //--------------------------------------------------------------------------
  2535. // Database fields
  2536. //--------------------------------------------------------------------------
  2537. #define iCFGDBTYPE               (DBICFG_BASE + 60)
  2538. #define iCFGDBPATH               (DBICFG_BASE + 61)
  2539. #define iCFGDBDEFAULTDRIVER      (DBICFG_BASE + 62)
  2540. #define iCFGDBENABLEBCD          (DBICFG_BASE + 63)
  2541.  
  2542. //--------------------------------------------------------------------------
  2543. // Others
  2544. //--------------------------------------------------------------------------
  2545. #define iCFGINIT                 (DBICFG_BASE + 70)
  2546. #define iTYPE                    (DBICFG_BASE + 71)
  2547. #define iCFGDBSTANDARD           (DBICFG_BASE + 72)
  2548. #define iCFGTRUE                 (DBICFG_BASE + 73)
  2549. #define iCFGFALSE                (DBICFG_BASE + 74)
  2550. #define iOPENMODE                (DBICFG_BASE + 75)
  2551. #define iREADWRITE               (DBICFG_BASE + 76)
  2552. #define iREADONLY                (DBICFG_BASE + 77)
  2553. #define iSHAREMODE               (DBICFG_BASE + 78)
  2554. #define iEXCLUSIVE               (DBICFG_BASE + 79)
  2555. #define iSHARED                  (DBICFG_BASE + 80)
  2556. #define iUSERNAME                (DBICFG_BASE + 81)
  2557. #define iSERVERNAME              (DBICFG_BASE + 82)
  2558. #define iDATABASENAME            (DBICFG_BASE + 83)
  2559. #define iSCHEMASIZE              (DBICFG_BASE + 84)
  2560. #define iCFGSTRICTINTEGRITY      (DBICFG_BASE + 85)
  2561. #define iTDSPACKETSIZE           (DBICFG_BASE + 86)
  2562. #define iORAINTEGER              (DBICFG_BASE + 87)
  2563. #define iDBNLS                   (DBICFG_BASE + 88)
  2564. #define iCOLLCHAR                (DBICFG_BASE + 89)
  2565. // numbers 90-? already used
  2566. #define iROWSETSIZE              (DBICFG_BASE + 134)
  2567.  
  2568. //--------------------------------------------------------------------------
  2569. // Repository Nodes
  2570. //--------------------------------------------------------------------------
  2571. #define iCFGDRDBNAME             (DBICFG_BASE + 213 )
  2572. #define iCFGDRTBLNAME            (DBICFG_BASE + 214 )
  2573. #define iCFGDRDESC               (DBICFG_BASE + 215 )
  2574. #define iCFGDRLANGDRIVER         (DBICFG_BASE + 212 )
  2575.  
  2576. //--------------------------------------------------------------------------
  2577. // System node:
  2578. //--------------------------------------------------------------------------
  2579. #define  iCFGFORMAT              (DBICFG_BASE + 130)
  2580.  
  2581. //--------------------------------------------------------------------------
  2582. // Format nodes:
  2583. //--------------------------------------------------------------------------
  2584. #define  iCFGDATE                (DBICFG_BASE + 131)
  2585. #define  iCFGTIME                (DBICFG_BASE + 132)
  2586. #define  iCFGNUMBER              (DBICFG_BASE + 133)
  2587.  
  2588. //--------------------------------------------------------------------------
  2589. // DATE and/or TIME fields:
  2590. //--------------------------------------------------------------------------
  2591. #define iCFGSEPARATOR            (DBICFG_BASE + 140)
  2592. #define iCFGMODE                 (DBICFG_BASE + 141)
  2593. #define iCFGFOURDIGITYEAR        (DBICFG_BASE + 142)
  2594. #define iCFGYEARBIASED           (DBICFG_BASE + 143)
  2595. #define iCFGLEADINGZEROM         (DBICFG_BASE + 144)
  2596. #define iCFGLEADINGZEROD         (DBICFG_BASE + 145)
  2597. #define iCFGTWELVEHOUR           (DBICFG_BASE + 146)
  2598. #define iCFGAMSTRING             (DBICFG_BASE + 147)
  2599. #define iCFGPMSTRING             (DBICFG_BASE + 148)
  2600. #define iCFGSECONDS              (DBICFG_BASE + 149)
  2601. #define iCFGMILSECONDS           (DBICFG_BASE + 150)
  2602.  
  2603. //--------------------------------------------------------------------------
  2604. // Number fields:
  2605. //--------------------------------------------------------------------------
  2606. #define iCFGDECIMALSEPARATOR     (DBICFG_BASE + 160)
  2607. #define iCFGTHOUSANDSEPARATOR    (DBICFG_BASE + 161)
  2608. #define iCFGDECIMALDIGITS        (DBICFG_BASE + 162)
  2609. #define iCFGLEADINGZERON         (DBICFG_BASE + 163)
  2610.  
  2611. #define iCFGDEFLANGDRV           (DBICFG_BASE + 165)
  2612. #define iCFGDBASEDEFLANGDRV      (DBICFG_BASE + 166)
  2613.  
  2614. //--------------------------------------------------------------------------
  2615. //Formats
  2616. //--------------------------------------------------------------------------
  2617. #define iCFGDEFSEPARATOR         (DBICFG_BASE + 170)
  2618. #define iCFGDEFMODE              (DBICFG_BASE + 171)
  2619. #define iCFGDEFFOURDIGITYEAR     (DBICFG_BASE + 172)
  2620. #define iCFGDEFYEARBIASED        (DBICFG_BASE + 173)
  2621. #define iCFGDEFLEADINGZEROM      (DBICFG_BASE + 174)
  2622. #define iCFGDEFLEADINGZEROD      (DBICFG_BASE + 175)
  2623. #define iCFGDEFTWELVEHOUR        (DBICFG_BASE + 176)
  2624. #define iCFGDEFAMSTRING          (DBICFG_BASE + 177)
  2625. #define iCFGDEFPMSTRING          (DBICFG_BASE + 178)
  2626. #define iCFGDEFSECONDS           (DBICFG_BASE + 179)
  2627. #define iCFGDEFMILSECONDS        (DBICFG_BASE + 180)
  2628. #define iCFGDEFDECIMALSEPARATOR  (DBICFG_BASE + 181)
  2629. #define iCFGDEFTHOUSANDSEPARATOR (DBICFG_BASE + 182)
  2630. #define iCFGDEFLEADINGZERO       (DBICFG_BASE + 183)
  2631.  
  2632. #define iCFGDEFVERSION             (DBICFG_BASE + 184)
  2633. #define iCFGDEFLOCALSHARE          (DBICFG_BASE + 185)
  2634. #define iCFGDEFMINBUFSIZE          (DBICFG_BASE + 186)
  2635. #define iCFGDEFMAXBUFSIZE          (DBICFG_BASE + 187)
  2636. #define iCFGDEFMAXFILEHANDLES      (DBICFG_BASE + 188)
  2637. #define iCFGDEFSYSFLAGS            (DBICFG_BASE + 189)
  2638. #define iCFGDEFLOWMEM              (DBICFG_BASE + 190)
  2639. #define iCFGDEFAUTOODBC            (DBICFG_BASE + 191)
  2640. #define iCFGDEFDEFDRV              (DBICFG_BASE + 192)
  2641.  
  2642. #define iCFGDEFDECIMALDIGITS       (DBICFG_BASE + 193)
  2643. #define iCFGDEFLEADINGZERON        (DBICFG_BASE + 194)
  2644.  
  2645. #define iCFGDEFPDXTYPE             (DBICFG_BASE + 195)
  2646. #define iCFGDEFPDXNETDIR           (DBICFG_BASE + 196)
  2647. #define iCFGDEFPDXLANGDRV          (DBICFG_BASE + 197)
  2648. #define iCFGDEFPDXLEVEL            (DBICFG_BASE + 198)
  2649. #define iCFGDEFPDXBLOCKSIZE        (DBICFG_BASE + 199)
  2650. #define iCFGDEFPDXFILLFACTOR       (DBICFG_BASE + 200)
  2651. #define iCFGDEFPDXSTRICTINTEGRTY   (DBICFG_BASE + 201)
  2652.  
  2653. #define iCFGDEFDBASETYPE           (DBICFG_BASE + 202)
  2654. #define iCFGDEFDBASELANGDRV        (DBICFG_BASE + 203)
  2655. #define iCFGDEFDBASELEVEL          (DBICFG_BASE + 204)
  2656. #define iCFGDEFDBASEMDXBLOCKSIZE   (DBICFG_BASE + 205)
  2657. #define iCFGDEFDBASEMEMOBLOCKSIZE  (DBICFG_BASE + 206)
  2658.  
  2659. #define iCFGAUTOODBC               (DBICFG_BASE + 207)
  2660. #define iCFGDEFDRV                 (DBICFG_BASE + 208)
  2661. #define iCFGENABLEBCD              (DBICFG_BASE + 209)
  2662. #define iCFGDEFSHAREDMEMSIZE       (DBICFG_BASE + 252)
  2663. #define iCFGDEFSHAREDMEMLOCATION   (DBICFG_BASE + 253)
  2664. #define iCFGDEFREPOSITORY          (DBICFG_BASE + 254)
  2665. #define iCFGDEFSQLQRYMODE          (DBICFG_BASE + 255)
  2666.  
  2667. // Categories
  2668. extern const char far SZCFGSYSTEM[];
  2669. extern const char far SZCFGDRIVER[];
  2670. extern const char far SZCFGDATABASE[];
  2671. extern const char far SZCFGREPOSITORY[];
  2672.  
  2673. // System Fields
  2674. extern const char far SZCFGSYSVERSION[];
  2675. extern const char far SZCFGSYSNETTYPE[];
  2676. extern const char far SZCFGSYSNETDIR[];
  2677. extern const char far SZCFGSYSLOCALSHARE[];
  2678. extern const char far SZCFGSYSLANGDRV[];
  2679. extern const char far SZCFGSYSLANGDRVDIR[];
  2680. extern const char far SZCFGSYSMINBUF[];
  2681. extern const char far SZCFGSYSMAXBUF[];
  2682. extern const char far SZCFGSYSLOCKRETRY[];
  2683. extern const char far SZCFGSYSFLAGS[];
  2684. extern const char far SZCFGMAXFILEHANDLES[];
  2685. extern const char far SZCFGSQLQRYMODE[];
  2686. extern const char far SZCFGLOWMEMLIMIT[];
  2687. extern const char far SZCFGSYSODBCCFGIMPORT[];
  2688. extern const char far SZCFGSYSLOCALREPOSITORY[];
  2689. //extern const char far SZCFGSYSCOMMONREPOSITORY[];
  2690. extern const char far SZCFGSYSSHAREDMEMSIZE[];
  2691. extern const char far SZCFGSYSSHAREDMEMLOCATION[];
  2692.  
  2693.  
  2694.  
  2695. // Driver Fields
  2696. extern const char far SZCFGDRVVERSION[];
  2697. extern const char far SZCFGDRVTYPE[];
  2698. extern const char far SZCFGDRVDLL[];
  2699. extern const char far SZCFGDRVDLL32[];
  2700. extern const char far SZCFGDRVFLAGS[];
  2701. extern const char far SZCFGDRVLANGDRIVER[];
  2702. extern const char far SZCFGDRVFILLFACTOR[];
  2703. extern const char far SZCFGDRVBLOCKSIZE[];
  2704. extern const char far SZCFGDRVLOCKPROTOCOL[];
  2705. extern const char far SZCFGDRVLEVEL[];
  2706. extern const char far SZCFGDRVTRACEMODE[];
  2707.  
  2708. // Dbase Driver fields
  2709. extern const char far SZCFGDRVMEMOBLOCKSIZE[];
  2710. extern const char far SZCFGDRVMDXBLOCKSIZE[];
  2711.  
  2712.  
  2713.  
  2714. // Driver Nodes
  2715. extern const char far SZCFGDRVINIT[];
  2716. extern const char far SZCFGDBCREATE[];
  2717. extern const char far SZCFGDBOPEN[];
  2718. extern const char far SZCFGTBLCREATE[];
  2719. extern const char far SZCFGTBLOPEN[];
  2720.  
  2721. // Database Nodes
  2722. extern const char far SZCFGDBINFO[];
  2723.  
  2724. // Database fields
  2725. extern const char far SZCFGDBTYPE[];
  2726. extern const char far SZCFGDBPATH[];
  2727. extern const char far SZCFGDBDEFAULTDRIVER[];
  2728. extern const char far SZCFGDBENABLEBCD[];
  2729.  
  2730. // Others
  2731. extern const char far SZCFGINIT[];
  2732. extern const char far SZTYPE[];
  2733. extern const char far SZCFGDBSTANDARD[];
  2734. extern const char far SZCFGTRUE[];
  2735. extern const char far SZCFGFALSE[];
  2736. extern const char far SZOPENMODE[];
  2737. extern const char far SZREADWRITE[];
  2738. extern const char far SZREADONLY[];
  2739. extern const char far SZSHAREMODE[];
  2740. extern const char far SZEXCLUSIVE[];
  2741. extern const char far SZSHARED[];
  2742. extern const char far SZUSERNAME[];
  2743. extern const char far SZSERVERNAME[];
  2744. extern const char far SZDATABASENAME[];
  2745. extern const char far SZSCHEMASIZE[];
  2746. extern const char far SZCFGSTRICTINTEGRITY[];
  2747. extern const char far SZTDSPACKETSIZE[];
  2748. extern const char far SZDBNLS[];
  2749. extern const char far SZCOLLCHAR[];
  2750.  
  2751. // Repository fields
  2752. extern const char far SZCFGDRDBNAME[];
  2753. extern const char far SZCFGDRTBLNAME[];
  2754. extern const char far SZCFGDRDESC[];
  2755. extern const char far SZCFGDRLANGDRIVER[];
  2756.  
  2757.  
  2758. // SYSTEM DATE/TIME/NUMBER FORMATS
  2759. // SYSTEM nodes:
  2760. extern const char far  SZCFGFORMAT[];
  2761.  
  2762. // Format nodes:
  2763. extern const char far  SZCFGDATE[];
  2764. extern const char far  SZCFGTIME[];
  2765. extern const char far  SZCFGNUMBER[];
  2766.  
  2767. // DATE and/or TIME fields:
  2768. extern const char far SZCFGSEPARATOR[];
  2769. extern const char far SZCFGMODE[];
  2770. extern const char far SZCFGFOURDIGITYEAR[];
  2771. extern const char far SZCFGYEARBIASED[];
  2772. extern const char far SZCFGLEADINGZEROM[];
  2773. extern const char far SZCFGLEADINGZEROD[];
  2774. extern const char far SZCFGTWELVEHOUR[];
  2775. extern const char far SZCFGAMSTRING[];
  2776. extern const char far SZCFGPMSTRING[];
  2777. extern const char far SZCFGSECONDS[];
  2778. extern const char far SZCFGMILSECONDS[];
  2779.  
  2780. // Number fields:
  2781. extern const char far SZCFGDECIMALSEPARATOR[];
  2782. extern const char far SZCFGTHOUSANDSEPARATOR[];
  2783. extern const char far SZCFGDECIMALDIGITS[];
  2784. extern const char far SZCFGLEADINGZERON[];
  2785.  
  2786.  
  2787. extern const char far SZCFGDEFLANGDRV[];
  2788. extern const char far SZCFGDBASEDEFLANGDRV[];
  2789. extern const char far SZCFGDEFSEPARATOR[];
  2790. extern const char far SZCFGDEFMODE[];
  2791. extern const char far SZCFGDEFFOURDIGITYEAR[];
  2792. extern const char far SZCFGDEFYEARBIASED[];
  2793. extern const char far SZCFGDEFLEADINGZEROM[];
  2794. extern const char far SZCFGDEFLEADINGZEROD[];
  2795. extern const char far SZCFGDEFTWELVEHOUR[];
  2796. extern const char far SZCFGDEFAMSTRING[];
  2797. extern const char far SZCFGDEFPMSTRING[];
  2798. extern const char far SZCFGDEFSECONDS[];
  2799. extern const char far SZCFGDEFMILSECONDS[];
  2800. extern const char far SZCFGDEFDECIMALSEPARATOR[];
  2801. extern const char far SZCFGDEFTHOUSANDSEPARATOR[];
  2802. extern const char far SZCFGDEFLEADINGZERO[];
  2803.  
  2804.  
  2805. #endif  // NODBISYMBOLS
  2806.  
  2807. #ifndef NOCFGHLP
  2808. #define   CFGHLP_BASE              0x3B00
  2809.  
  2810. #define iCFGHLP_SYSNODE             (CFGHLP_BASE +1)
  2811. #define iCFGHLP_SYSINITNODE         (CFGHLP_BASE +2)
  2812. #define iCFGHLP_SYSVERSION          (CFGHLP_BASE +3)
  2813. #define iCFGHLP_SYSLOCALSHARE       (CFGHLP_BASE +4)
  2814. #define iCFGHLP_SYSMINBUFSIZE       (CFGHLP_BASE +5)
  2815. #define iCFGHLP_SYSMAXBUFSIZE       (CFGHLP_BASE +6)
  2816. #define iCFGHLP_SYSLANGDRIVER       (CFGHLP_BASE +7)
  2817. #define iCFGHLP_SYSNETTYPE          (CFGHLP_BASE +8)
  2818. #define iCFGHLP_SYSFLAGS            (CFGHLP_BASE +9)
  2819. #define iCFGHLP_SYSMAXFILE          (CFGHLP_BASE +10)
  2820. #define iCFGHLP_SYSLOWMEM           (CFGHLP_BASE +11)
  2821. #define iCFGHLP_SYSAUTOODBC         (CFGHLP_BASE +12)
  2822. #define iCFGHLP_SYSDEFDRV           (CFGHLP_BASE +13)
  2823. #define iCFGHLP_SYSSQLQRYMODE       (CFGHLP_BASE +14)
  2824. #define iCFGHLP_SYSSQLPASSTHRU      (CFGHLP_BASE +15)
  2825. #define iCFGHLP_SYSFORMATNODE       (CFGHLP_BASE +16)
  2826. #define iCFGHLP_DATENODE            (CFGHLP_BASE +17)
  2827. #define iCFGHLP_DATESEPARATOR       (CFGHLP_BASE +18)
  2828. #define iCFGHLP_DATEMODE            (CFGHLP_BASE +19)
  2829. #define iCFGHLP_DATEFOURDIGIT       (CFGHLP_BASE +20)
  2830. #define iCFGHLP_DATEYEARBIASED      (CFGHLP_BASE +21)
  2831. #define iCFGHLP_DATEZEROM           (CFGHLP_BASE +22)
  2832. #define iCFGHLP_DATEZEROD           (CFGHLP_BASE +23)
  2833. #define iCFGHLP_TIMENODE            (CFGHLP_BASE +24)
  2834. #define iCFGHLP_TIMETWELVEHOUR      (CFGHLP_BASE +25)
  2835. #define iCFGHLP_TIMEAMSTRING        (CFGHLP_BASE +26)
  2836. #define iCFGHLP_TIMEPMSTRING        (CFGHLP_BASE +27)
  2837. #define iCFGHLP_TIMESECONDS         (CFGHLP_BASE +28)
  2838. #define iCFGHLP_TIMEMILSEC          (CFGHLP_BASE +29)
  2839. #define iCFGHLP_NUMNODE             (CFGHLP_BASE +30)
  2840. #define iCFGHLP_NUMDECIMALSEPARATOR (CFGHLP_BASE +31)
  2841. #define iCFGHLP_NUMTHOUSANDSEPARATOR (CFGHLP_BASE +32)
  2842. #define iCFGHLP_NUMDECIMALDIGITS    (CFGHLP_BASE +33)
  2843. #define iCFGHLP_NUMZERON            (CFGHLP_BASE +34)
  2844. #define iCFGHLP_DRVNODE             (CFGHLP_BASE +35)
  2845. #define iCFGHLP_PDXNODE             (CFGHLP_BASE +36)
  2846. #define iCFGHLP_PDXINITNODE         (CFGHLP_BASE +37)
  2847. #define iCFGHLP_DRVTYPE             (CFGHLP_BASE +38)
  2848. #define iCFGHLP_PDXNETDIR           (CFGHLP_BASE +39)
  2849. #define iCFGHLP_PDXTBLNODE          (CFGHLP_BASE +40)
  2850. #define iCFGHLP_PDXLEVEL            (CFGHLP_BASE +41)
  2851. #define iCFGHLP_PDXBLOCKSIZE        (CFGHLP_BASE +42)
  2852. #define iCFGHLP_PDXFILLFACTOR       (CFGHLP_BASE +43)
  2853. #define iCFGHLP_PDXSTRICT           (CFGHLP_BASE +44)
  2854. #define iCFGHLP_DBNODE              (CFGHLP_BASE +45)
  2855. #define iCFGHLP_DBINITNODE          (CFGHLP_BASE +46)
  2856. #define iCFGHLP_DBVERSION           (CFGHLP_BASE +47)
  2857. #define iCFGHLP_DBTBLNODE           (CFGHLP_BASE +48)
  2858. #define iCFGHLP_DBLEVEL             (CFGHLP_BASE +49)
  2859. #define iCFGHLP_DBMDXBLOCKSIZE      (CFGHLP_BASE +50)
  2860. #define iCFGHLP_DBMEMOFILEBLOCKSIZE (CFGHLP_BASE +51)
  2861. #define iCFGHLP_INTNODE             (CFGHLP_BASE +52)
  2862. #define iCFGHLP_INTINITNODE         (CFGHLP_BASE +53)
  2863. #define iCFGHLP_INTVERSION          (CFGHLP_BASE +54)
  2864. #define iCFGHLP_SQLDLL              (CFGHLP_BASE +55)
  2865. #define iCFGHLP_SQLDLL32            (CFGHLP_BASE +56)
  2866. #define iCFGHLP_SQLDRIVERFLAGS      (CFGHLP_BASE +57)
  2867. #define iCFGHLP_INTDBNODE           (CFGHLP_BASE +58)
  2868. #define iCFGHLP_SQLSERVER           (CFGHLP_BASE +59)
  2869. #define iCFGHLP_SQLUSER             (CFGHLP_BASE +60)
  2870. #define iCFGHLP_SQLOPENMODE         (CFGHLP_BASE +61)
  2871. #define iCFGHLP_SQLSCHEMASIZE       (CFGHLP_BASE +62)
  2872. #define iCFGHLP_SQLSCHEMATIME       (CFGHLP_BASE +63)
  2873. #define iCFGHLP_SYBNODE             (CFGHLP_BASE +64)
  2874. #define iCFGHLP_SYBINITNODE         (CFGHLP_BASE +65)
  2875. #define iCFGHLP_SYBVERSION          (CFGHLP_BASE +66)
  2876. #define iCFGHLP_SQLCONNECT          (CFGHLP_BASE +67)
  2877. #define iCFGHLP_SQLTIMEOUT          (CFGHLP_BASE +68)
  2878. #define iCFGHLP_SYBDBNODE           (CFGHLP_BASE +69)
  2879. #define iCFGHLP_SQLDATABASE         (CFGHLP_BASE +70)
  2880. #define iCFGHLP_SQLBLOBEDIT         (CFGHLP_BASE +71)
  2881. #define iCFGHLP_SQLMAXQUERY         (CFGHLP_BASE +72)
  2882. #define iCFGHLP_ORANODE             (CFGHLP_BASE +73)
  2883. #define iCFGHLP_ORAINITNODE         (CFGHLP_BASE +74)
  2884. #define iCFGHLP_ORAVERSION          (CFGHLP_BASE +75)
  2885. #define iCFGHLP_SQLVENDOR           (CFGHLP_BASE +76)
  2886. #define iCFGHLP_ORADBNODE           (CFGHLP_BASE +77)
  2887. #define iCFGHLP_SQLNETPROTOCOL      (CFGHLP_BASE +78)
  2888. #define iCFGHLP_MSSNODE             (CFGHLP_BASE +79)
  2889. #define iCFGHLP_MSSINITNODE         (CFGHLP_BASE +80)
  2890. #define iCFGHLP_MSSVERSION          (CFGHLP_BASE +81)
  2891. #define iCFGHLP_MSSDBNODE           (CFGHLP_BASE +82)
  2892. #define iCFGHLP_INFNODE             (CFGHLP_BASE +83)
  2893. #define iCFGHLP_INFINITNODE         (CFGHLP_BASE +84)
  2894. #define iCFGHLP_INFVERSION          (CFGHLP_BASE +85)
  2895. #define iCFGHLP_INFDBNODE           (CFGHLP_BASE +86)
  2896. #define iCFGHLP_SQLLOCKMODE         (CFGHLP_BASE +87)
  2897. #define iCFGHLP_SQLTRACEMODE        (CFGHLP_BASE +88)
  2898. #define iCFGHLP_SQLMAXROWS          (CFGHLP_BASE +89)
  2899. #define iCFGHLP_SQLBATCHCOUNT       (CFGHLP_BASE +90)
  2900. #define iCFGHLP_SYSSHAREDMEMSIZ     (CFGHLP_BASE +91)
  2901. #define iCFGHLP_SYSSHAREDMEMLOC     (CFGHLP_BASE +92)
  2902. #define iCFGHLP_SYSDATAREP          (CFGHLP_BASE +93)
  2903. #define iCFGHLP_ALIASTYPE           (CFGHLP_BASE +94)
  2904. #define iCFGHLP_ALIASPATH           (CFGHLP_BASE +95)
  2905. #define iCFGHLP_ALIASDEFDRV         (CFGHLP_BASE +96)
  2906. #define iCFGHLP_ENABLESCHEMACACHE   (CFGHLP_BASE +97)
  2907. #define iCFGHLP_SCHEMACACHEDIR      (CFGHLP_BASE +98)
  2908. #define iCFGHLP_HOSTNAME            (CFGHLP_BASE +99)
  2909. #define iCFGHLP_APPLICATIONNAME     (CFGHLP_BASE +100)
  2910. #define iCFGHLP_NATIONALLANGNAME    (CFGHLP_BASE +101)
  2911. #define iCFGHLP_ALIASENABLEBCD      (CFGHLP_BASE +102)
  2912. #define iCFGHLP_TDSPACKETSIZE       (CFGHLP_BASE +103)
  2913. #define iCFGHLP_ORAINTEGER          (CFGHLP_BASE +104)
  2914. #define iCFGHLP_ORALISTSYNONYMS     (CFGHLP_BASE +105)
  2915. #define iCFGHLP_ROWSETSIZE          (CFGHLP_BASE +106)
  2916. #define iCFGHLP_DB2DRIVER           (CFGHLP_BASE +107)
  2917. #define iCFGHLP_DB2DSN              (CFGHLP_BASE +108)
  2918. #define iCFGHLP_DB2NODE             (CFGHLP_BASE +109)
  2919. #define iCFGHLP_DB2INITNODE         (CFGHLP_BASE +110)
  2920. #define iCFGHLP_DB2VERSION          (CFGHLP_BASE +111)
  2921. #define iCFGHLP_DB2DBNODE           (CFGHLP_BASE +112)
  2922. #define iCFGHLP_COLLCHAR            (CFGHLP_BASE +113)
  2923. #define iCFGHLP_DBNLS               (CFGHLP_BASE +114)
  2924. #endif // NOCFGHLP
  2925.  
  2926. #ifndef NODBIERRS
  2927. #define ErrCat(rslt)  ((UINT16)(rslt) >> 8)
  2928. #define ErrCode(rslt) ((UINT16)(rslt) & 0x00FF)
  2929.  
  2930.  
  2931. //============================================================================
  2932. //                            Error Categories
  2933. //============================================================================
  2934.  
  2935. #define ERRCAT_NONE                0   //  0   No error
  2936. #define ERRCAT_SYSTEM            0x21  //  33  System related (Fatal Error)
  2937. #define ERRCAT_NOTFOUND          0x22  //  34  Object of interest Not Found
  2938. #define ERRCAT_DATACORRUPT       0x23  //  35  Physical Data Corruption
  2939. #define ERRCAT_IO                0x24  //  36  I/O related error
  2940. #define ERRCAT_LIMIT             0x25  //  37  Resource or Limit error
  2941. #define ERRCAT_INTEGRITY         0x26  //  38  Integrity Violation
  2942. #define ERRCAT_INVALIDREQ        0x27  //  39  Invalid Request
  2943. #define ERRCAT_LOCKCONFLICT      0x28  //  40  Locking/Contention related
  2944. #define ERRCAT_SECURITY          0x29  //  41  Access Violation - Security related
  2945. #define ERRCAT_INVALIDCONTEXT    0x2A  //  42  Invalid context
  2946. #define ERRCAT_OS                0x2B  //  43  Os Error not handled by Idapi
  2947. #define ERRCAT_NETWORK           0x2C  //  44  Network related
  2948. #define ERRCAT_OPTPARAM          0x2D  //  45  Optional parameter related
  2949. #define ERRCAT_QUERY             0x2E  //  46  Query related
  2950. #define ERRCAT_VERSION           0x2F  //  47  Version Mismatch Category
  2951. #define ERRCAT_CAPABILITY        0x30  //  48  Capability not supported
  2952. #define ERRCAT_CONFIG            0x31  //  49  System configuration error
  2953. #define ERRCAT_WARNING           0x32  //  50
  2954. #define ERRCAT_OTHER             0x33  //  51  Miscellaneous
  2955. #define ERRCAT_COMPATIBILITY     0x34  //  52  Compatibility related
  2956. #define ERRCAT_REPOSITORY        0x35  //  53  Data Repository related
  2957.  
  2958. #define ERRCAT_DRIVER            0x3E  //  62  Driver related
  2959. #define ERRCAT_RC                0x3F  //  63  Internal
  2960.  
  2961.  
  2962. #define ERRBASE_NONE              0     // No error
  2963. #define ERRBASE_SYSTEM          0x2100  // System related (Fatal Error)
  2964. #define ERRBASE_NOTFOUND        0x2200  // Object of interest Not Found
  2965. #define ERRBASE_DATACORRUPT     0x2300  // Physical Data Corruption
  2966. #define ERRBASE_IO              0x2400  // I/O related error
  2967. #define ERRBASE_LIMIT           0x2500  // Resource or Limit error
  2968. #define ERRBASE_INTEGRITY       0x2600  // Integrity Violation
  2969. #define ERRBASE_INVALIDREQ      0x2700  // Invalid Request
  2970. #define ERRBASE_LOCKCONFLICT    0x2800  // Locking/Contention related
  2971. #define ERRBASE_SEC             0x2900  // Access Violation - Security related
  2972. #define ERRBASE_IC              0x2A00  // Invalid context
  2973. #define ERRBASE_OS              0x2B00  // Os Error not handled by Idapi
  2974. #define ERRBASE_NETWORK         0x2C00  // Network related
  2975. #define ERRBASE_OPTPARAM        0x2D00  // Optional Parameter related
  2976. #define ERRBASE_QUERY           0x2E00  // Query related
  2977. #define ERRBASE_VERSION         0x2F00  // Version Mismatch Category
  2978. #define ERRBASE_CAPABILITY      0x3000  // Capability not supported
  2979. #define ERRBASE_CONFIG          0x3100  // System configuration error
  2980. #define ERRBASE_WARNING         0x3200  //
  2981. #define ERRBASE_OTHER           0x3300  // Miscellaneous
  2982. #define ERRBASE_COMPATIBILITY   0x3400  // Compatibility related
  2983. #define ERRBASE_REPOSITORY      0x3500  // Data Repository related
  2984.  
  2985. #define ERRBASE_DRIVER          0x3E00  // Driver related
  2986. #define ERRBASE_RC              0x3F00  // Internal
  2987.  
  2988.  
  2989. //=============================================================================
  2990. //                           Error Codes By Category
  2991. //=============================================================================
  2992.  
  2993. // ERRCAT_NONE                  (0)
  2994. // ===========
  2995.  
  2996. #define ERRCODE_NONE             0
  2997.  
  2998. #define DBIERR_NONE                (ERRBASE_NONE + ERRCODE_NONE)
  2999.  
  3000. //  ERRCAT_SYSTEM
  3001. //  =============
  3002.  
  3003. #define  ERRCODE_SYSFILEOPEN     1   // Cannot open a system file
  3004. #define  ERRCODE_SYSFILEIO       2   // I/O error on a system file
  3005. #define  ERRCODE_SYSCORRUPT      3   // Data structure corruption
  3006. #define  ERRCODE_NOCONFIGFILE    4   // Cannot find config file
  3007. #define  ERRCODE_CFGCANNOTWRITE  5   // Cannot write config file (READONLY)
  3008. #define  ERRCODE_CFGMULTIFILE    6   // Initializing with different ini file
  3009. #define  ERRCODE_REENTERED       7   // System has been illegally re-entered
  3010. #define  ERRCODE_CANTFINDIDAPI   8   // Cannot locate IDAPIxx.DLL
  3011. #define  ERRCODE_CANTLOADIDAPI   9   // Cannot load IDAPIxx.DLL
  3012. #define  ERRCODE_CANTLOADLIBRARY 10  // Cannot load a service DLL
  3013. #define  ERRCODE_TEMPFILEERR     11  // Cannot create or open temporary file
  3014. #define  ERRCODE_MULTIPLEIDAPI   12  // Trying to load multiple IDAPIxx.DLL
  3015.  
  3016. #define  DBIERR_SYSFILEOPEN      (ERRBASE_SYSTEM + ERRCODE_SYSFILEOPEN)
  3017. #define  DBIERR_SYSFILEIO        (ERRBASE_SYSTEM + ERRCODE_SYSFILEIO)
  3018. #define  DBIERR_SYSCORRUPT       (ERRBASE_SYSTEM + ERRCODE_SYSCORRUPT)
  3019. #define  DBIERR_NOCONFIGFILE     (ERRBASE_SYSTEM + ERRCODE_NOCONFIGFILE)
  3020. #define  DBIERR_CFGCANNOTWRITE   (ERRBASE_SYSTEM + ERRCODE_CFGCANNOTWRITE)
  3021. #define  DBIERR_CFGMULTIFILE     (ERRBASE_SYSTEM + ERRCODE_CFGMULTIFILE)
  3022. #define  DBIERR_REENTERED        (ERRBASE_SYSTEM + ERRCODE_REENTERED)
  3023. #define  DBIERR_CANTFINDIDAPI    (ERRBASE_SYSTEM + ERRCODE_CANTFINDIDAPI)
  3024. #define  DBIERR_CANTLOADIDAPI    (ERRBASE_SYSTEM + ERRCODE_CANTLOADIDAPI)
  3025. #define  DBIERR_CANTLOADLIBRARY  (ERRBASE_SYSTEM + ERRCODE_CANTLOADLIBRARY)
  3026. #define  DBIERR_TEMPFILEERR      (ERRBASE_SYSTEM + ERRCODE_TEMPFILEERR)
  3027. #define  DBIERR_MULTIPLEIDAPI    (ERRBASE_SYSTEM + ERRCODE_MULTIPLEIDAPI)
  3028.  
  3029. #define  DBIERR_CANTFINDODAPI    DBIERR_CANTFINDIDAPI
  3030. #define  DBIERR_CANTLOADODAPI    DBIERR_CANTLOADIDAPI
  3031.  
  3032. //  ERRCAT_NOTFOUND
  3033. //  ===============
  3034.  
  3035. #define  ERRCODE_BOF             1        // Beginning of Virtual table
  3036. #define  ERRCODE_EOF             2        // End of Virtual table
  3037. #define  ERRCODE_RECMOVED        3        // Fly-away
  3038. #define  ERRCODE_KEYORRECDELETED 4        // Record Deleted/Key Modified
  3039. #define  ERRCODE_NOCURRREC       5        // No current record
  3040. #define  ERRCODE_RECNOTFOUND     6        // Record was not found
  3041. #define  ERRCODE_ENDOFBLOB       7        // End of Blob reached
  3042. #define  ERRCODE_OBJNOTFOUND     8        // Generic Not found
  3043. #define  ERRCODE_FMLMEMBERNOTFOUND 9      // Family member not found
  3044. #define  ERRCODE_BLOBFILEMISSING 10       // 0x0a Blob file for table is missing
  3045. #define  ERRCODE_LDNOTFOUND      11       // 0x0b Language driver not found
  3046.  
  3047. #define  DBIERR_BOF              (ERRBASE_NOTFOUND + ERRCODE_BOF)
  3048. #define  DBIERR_EOF              (ERRBASE_NOTFOUND + ERRCODE_EOF)
  3049. #define  DBIERR_RECMOVED         (ERRBASE_NOTFOUND + ERRCODE_RECMOVED)
  3050. #define  DBIERR_RECDELETED       (ERRBASE_NOTFOUND + ERRCODE_KEYORRECDELETED)
  3051. #define  DBIERR_KEYORRECDELETED  (ERRBASE_NOTFOUND + ERRCODE_KEYORRECDELETED)
  3052. #define  DBIERR_NOCURRREC        (ERRBASE_NOTFOUND + ERRCODE_NOCURRREC)
  3053. #define  DBIERR_RECNOTFOUND      (ERRBASE_NOTFOUND + ERRCODE_RECNOTFOUND)
  3054. #define  DBIERR_ENDOFBLOB        (ERRBASE_NOTFOUND + ERRCODE_ENDOFBLOB)
  3055. #define  DBIERR_OBJNOTFOUND      (ERRBASE_NOTFOUND + ERRCODE_OBJNOTFOUND)
  3056. #define  DBIERR_FMLMEMBERNOTFOUND (ERRBASE_NOTFOUND + ERRCODE_FMLMEMBERNOTFOUND)
  3057. #define  DBIERR_BLOBFILEMISSING (ERRBASE_NOTFOUND + ERRCODE_BLOBFILEMISSING)
  3058. #define  DBIERR_LDNOTFOUND (ERRBASE_NOTFOUND + ERRCODE_LDNOTFOUND)
  3059.  
  3060. // ERRCAT_DATACORRUPT
  3061. // ==================
  3062.  
  3063. #define  ERRCODE_HEADERCORRUPT   1        // Corrupt Header
  3064. #define  ERRCODE_FILECORRUPT     2        // File corrupt - other than header
  3065. #define  ERRCODE_MEMOCORRUPT     3        // Memo file corrupted
  3066. #define  ERRCODE_BMPCORRUPT      4        // BitMap is corrupt (Internal error)
  3067. #define  ERRCODE_INDEXCORRUPT    5        // Index is corrupt
  3068. #define  ERRCODE_CORRUPTLOCKFILE 6        // Corrupt lock file
  3069. #define  ERRCODE_FAMFILEINVALID  7        // Corrupt family file
  3070. #define  ERRCODE_VALFILECORRUPT  8        // Val file is missing or corrupt
  3071. #define  ERRCODE_FOREIGNINDEX    9        // Index is in a foreign format - import first
  3072.  
  3073.  
  3074. #define  DBIERR_HEADERCORRUPT    (ERRBASE_DATACORRUPT + ERRCODE_HEADERCORRUPT)
  3075. #define  DBIERR_FILECORRUPT      (ERRBASE_DATACORRUPT + ERRCODE_FILECORRUPT)
  3076. #define  DBIERR_MEMOCORRUPT      (ERRBASE_DATACORRUPT + ERRCODE_MEMOCORRUPT)
  3077. #define  DBIERR_BMPCORRUPT       (ERRBASE_DATACORRUPT + ERRCODE_BMPCORRUPT)
  3078. #define  DBIERR_INDEXCORRUPT     (ERRBASE_DATACORRUPT + ERRCODE_INDEXCORRUPT)
  3079. #define  DBIERR_CORRUPTLOCKFILE  (ERRBASE_DATACORRUPT + ERRCODE_CORRUPTLOCKFILE)
  3080. #define  DBIERR_FAMFILEINVALID   (ERRBASE_DATACORRUPT + ERRCODE_FAMFILEINVALID)
  3081. #define  DBIERR_VALFILECORRUPT   (ERRBASE_DATACORRUPT + ERRCODE_VALFILECORRUPT)
  3082. #define  DBIERR_FOREIGNINDEX     (ERRBASE_DATACORRUPT + ERRCODE_FOREIGNINDEX)
  3083.  
  3084.  
  3085. // ERRCAT_IO
  3086. // =========
  3087.  
  3088. #define  ERRCODE_READERR         1        // Read failure (not expected)
  3089. #define  ERRCODE_WRITEERR        2        // Write failure (not expected)
  3090. #define  ERRCODE_DIRNOACCESS     3        // No access to dir
  3091. #define  ERRCODE_FILEDELETEFAIL  4        // File delete failed
  3092. #define  ERRCODE_FILENOACCESS    5        // No access to file
  3093. #define  ERRCODE_ACCESSDISABLED  6        // Access to table disabled (previous error)
  3094.  
  3095. #define  DBIERR_READERR          (ERRBASE_IO + ERRCODE_READERR)
  3096. #define  DBIERR_WRITEERR         (ERRBASE_IO + ERRCODE_WRITEERR)
  3097. #define  DBIERR_DIRNOACCESS      (ERRBASE_IO + ERRCODE_DIRNOACCESS)
  3098. #define  DBIERR_FILEDELETEFAIL   (ERRBASE_IO + ERRCODE_FILEDELETEFAIL)
  3099. #define  DBIERR_FILENOACCESS     (ERRBASE_IO + ERRCODE_FILENOACCESS)
  3100. #define  DBIERR_ACCESSDISABLED   (ERRBASE_IO + ERRCODE_ACCESSDISABLED)
  3101.  
  3102. // ERRCAT_LIMIT
  3103. // ============
  3104.  
  3105. #define  ERRCODE_NOMEMORY        1        // Not enough Memory for this op
  3106. #define  ERRCODE_NOFILEHANDLES   2        // Not enough File handles
  3107. #define  ERRCODE_NODISKSPACE     3        // Not enough Disk space
  3108. #define  ERRCODE_NOTEMPTBLSPACE  4        // Temporary Table resource limit
  3109. #define  ERRCODE_RECTOOBIG       5        // Too big a record size for table
  3110. #define  ERRCODE_CURSORLIMIT     6        // Too many open cursors
  3111. #define  ERRCODE_TABLEFULL       7        // Table is full
  3112. #define  ERRCODE_WSSESLIMIT      8        // Too many sessions from this WS
  3113. #define  ERRCODE_SERNUMLIMIT     9        // Serial number limit (paradox)
  3114. #define  ERRCODE_INTERNALLIMIT   10       // 0x0a Some internal limit (see context)
  3115. #define  ERRCODE_OPENTBLLIMIT    11       // 0x0b Too many open tables
  3116. #define  ERRCODE_TBLCURSORLIMIT  12       // 0x0c Too many cursors per table
  3117. #define  ERRCODE_RECLOCKLIMIT    13       // 0x0d Too many record locks on table
  3118. #define  ERRCODE_CLIENTSLIMIT    14       // 0x0e Too many clients
  3119. #define  ERRCODE_INDEXLIMIT      15       // 0x0f Too many indexes (also in Table Create)
  3120. #define  ERRCODE_SESSIONSLIMIT   16       // 0x10 Too many sessions
  3121. #define  ERRCODE_DBLIMIT         17       // 0x11 Too many databases
  3122. #define  ERRCODE_PASSWORDLIMIT   18       // 0x12 Too many passwords
  3123. #define  ERRCODE_DRIVERLIMIT     19       // 0x13 Too many active drivers
  3124. #define  ERRCODE_FLDLIMIT        20       // 0x14 Too many Fields in Table Create
  3125. #define  ERRCODE_TBLLOCKLIMIT    21       // 0x15 Too many table locks
  3126. #define  ERRCODE_OPENBLOBLIMIT   22       // 0x16 Too many open blobs
  3127. #define  ERRCODE_LOCKFILELIMIT   23       // 0x17 Lock file has grown too big
  3128. #define  ERRCODE_OPENQRYLIMIT    24       // 0x18 Too many open queries
  3129. #define  ERRCODE_THREADLIMIT     25       // 0x19 Too many threads for client
  3130. #define  ERRCODE_BLOBLIMIT       26       // 0x1a Too many blobs
  3131. #define  ERRCODE_PDX50NAMELIMIT  27       // 0x1b Pathname is too long for a Paradox 5.0 or less table
  3132. #define  ERRCODE_ROWFETCHLIMIT   28       // 0x1c Row fetch limit
  3133. #define  ERRCODE_LONGNAMENOTALLOWED 29    // 0x1d Long name is not allowed for this tableversion
  3134.  
  3135. #define  DBIERR_NOMEMORY         (ERRBASE_LIMIT + ERRCODE_NOMEMORY)
  3136. #define  DBIERR_NOFILEHANDLES    (ERRBASE_LIMIT + ERRCODE_NOFILEHANDLES)
  3137. #define  DBIERR_NODISKSPACE      (ERRBASE_LIMIT + ERRCODE_NODISKSPACE)
  3138. #define  DBIERR_NOTEMPTBLSPACE   (ERRBASE_LIMIT + ERRCODE_NOTEMPTBLSPACE)
  3139. #define  DBIERR_RECTOOBIG        (ERRBASE_LIMIT + ERRCODE_RECTOOBIG)
  3140. #define  DBIERR_CURSORLIMIT      (ERRBASE_LIMIT + ERRCODE_CURSORLIMIT)
  3141. #define  DBIERR_TABLEFULL        (ERRBASE_LIMIT + ERRCODE_TABLEFULL)
  3142. #define  DBIERR_WSSESLIMIT       (ERRBASE_LIMIT + ERRCODE_WSSESLIMIT)
  3143. #define  DBIERR_SERNUMLIMIT      (ERRBASE_LIMIT + ERRCODE_SERNUMLIMIT)
  3144. #define  DBIERR_INTERNALLIMIT    (ERRBASE_LIMIT + ERRCODE_INTERNALLIMIT)
  3145. #define  DBIERR_OPENTBLLIMIT     (ERRBASE_LIMIT + ERRCODE_OPENTBLLIMIT)
  3146. #define  DBIERR_TBLCURSORLIMIT   (ERRBASE_LIMIT + ERRCODE_TBLCURSORLIMIT)
  3147. #define  DBIERR_RECLOCKLIMIT     (ERRBASE_LIMIT + ERRCODE_RECLOCKLIMIT)
  3148. #define  DBIERR_CLIENTSLIMIT     (ERRBASE_LIMIT + ERRCODE_CLIENTSLIMIT)
  3149. #define  DBIERR_INDEXLIMIT       (ERRBASE_LIMIT + ERRCODE_INDEXLIMIT)
  3150. #define  DBIERR_SESSIONSLIMIT    (ERRBASE_LIMIT + ERRCODE_SESSIONSLIMIT)
  3151. #define  DBIERR_DBLIMIT          (ERRBASE_LIMIT + ERRCODE_DBLIMIT)
  3152. #define  DBIERR_PASSWORDLIMIT    (ERRBASE_LIMIT + ERRCODE_PASSWORDLIMIT)
  3153. #define  DBIERR_DRIVERLIMIT      (ERRBASE_LIMIT + ERRCODE_DRIVERLIMIT)
  3154. #define  DBIERR_FLDLIMIT         (ERRBASE_LIMIT + ERRCODE_FLDLIMIT)
  3155. #define  DBIERR_TBLLOCKLIMIT     (ERRBASE_LIMIT + ERRCODE_TBLLOCKLIMIT)
  3156. #define  DBIERR_OPENBLOBLIMIT    (ERRBASE_LIMIT + ERRCODE_OPENBLOBLIMIT)
  3157. #define  DBIERR_LOCKFILELIMIT    (ERRBASE_LIMIT + ERRCODE_LOCKFILELIMIT)
  3158. #define  DBIERR_OPENQRYLIMIT     (ERRBASE_LIMIT + ERRCODE_OPENQRYLIMIT)
  3159. #define  DBIERR_THREADLIMIT      (ERRBASE_LIMIT + ERRCODE_THREADLIMIT)
  3160. #define  DBIERR_BLOBLIMIT        (ERRBASE_LIMIT + ERRCODE_BLOBLIMIT)
  3161. #define  DBIERR_PDX50NAMELIMIT   (ERRBASE_LIMIT + ERRCODE_PDX50NAMELIMIT)
  3162. #define  DBIERR_ROWFETCHLIMIT    (ERRBASE_LIMIT + ERRCODE_ROWFETCHLIMIT)
  3163. #define  DBIERR_LONGNAMENOTALLOWED (ERRBASE_LIMIT + ERRCODE_LONGNAMENOTALLOWED)
  3164.  
  3165.  
  3166. // ERRCAT_INTEGRITY
  3167. // ================
  3168.  
  3169. #define ERRCODE_KEYVIOL             1     // Key violation
  3170. #define ERRCODE_MINVALERR           2     // Min val check failed
  3171. #define ERRCODE_MAXVALERR           3     // Max val check failed
  3172. #define ERRCODE_REQDERR             4     // Field value required
  3173. #define ERRCODE_FORIEGNKEYERR       5     // Master record missing
  3174. #define ERRCODE_DETAILRECORDSEXIST  6     // Cannot MODIFY or DELETE this Master record
  3175. #define ERRCODE_MASTERTBLLEVEL      7     // Master Table Level is incorrect
  3176. #define ERRCODE_LOOKUPTABLEERR      8     // Field value out of lookup tbl range
  3177. #define ERRCODE_LOOKUPTBLOPENERR    9     // Lookup Table Open failed
  3178. #define ERRCODE_DETAILTBLOPENERR   10     // 0x0a Detail Table Open failed
  3179. #define ERRCODE_MASTERTBLOPENERR   11     // 0x0b Master Table Open failed
  3180. #define ERRCODE_FIELDISBLANK       12     // 0x0c Field is blank
  3181.  
  3182. #define ERRCODE_MASTEREXISTS       13     // 0x0d Master Table exists
  3183. #define ERRCODE_MASTERTBLOPEN      14     // 0x0e Master Table is open
  3184.  
  3185. #define ERRCODE_DETAILTABLESEXIST    15   // 0x0f Detail Tables exist ( cannot delete, rename ... )
  3186. #define ERRCODE_DETAILRECEXISTEMPTY  16   // 0x10 Cannot empty because details exist
  3187. #define ERRCODE_MASTERREFERENCEERR   17   // 0x11 Cannot modify while adding self referencing Referential Integrity
  3188. #define ERRCODE_DETAILTBLOPEN        18   // 0x12 Detail Table is opened
  3189. #define ERRCODE_DEPENDENTSMUSTBEEMPTY  19 // 0x13 Cannot make a master a detail of another table if its details are not empty !
  3190. #define ERRCODE_RINTREQINDEX         20   // 0x14 Ref. integrity fields must be indexed
  3191. #define ERRCODE_LINKEDTBLPROTECTED   21   // 0x15 Master Table is protected ( requires password to open)
  3192. #define ERRCODE_FIELDMULTILINKED     22   // 0x16 Field has more than one master
  3193.  
  3194.  
  3195. #define DBIERR_KEYVIOL             (ERRBASE_INTEGRITY + ERRCODE_KEYVIOL)
  3196. #define DBIERR_MINVALERR           (ERRBASE_INTEGRITY + ERRCODE_MINVALERR)
  3197. #define DBIERR_MAXVALERR           (ERRBASE_INTEGRITY + ERRCODE_MAXVALERR)
  3198. #define DBIERR_REQDERR             (ERRBASE_INTEGRITY + ERRCODE_REQDERR)
  3199. #define DBIERR_FORIEGNKEYERR       (ERRBASE_INTEGRITY + ERRCODE_FORIEGNKEYERR)
  3200. #define DBIERR_DETAILRECORDSEXIST  (ERRBASE_INTEGRITY + ERRCODE_DETAILRECORDSEXIST)
  3201. #define DBIERR_MASTERTBLLEVEL      (ERRBASE_INTEGRITY + ERRCODE_MASTERTBLLEVEL)
  3202. #define DBIERR_LOOKUPTABLEERR      (ERRBASE_INTEGRITY + ERRCODE_LOOKUPTABLEERR)
  3203. #define DBIERR_LOOKUPTBLOPENERR    (ERRBASE_INTEGRITY + ERRCODE_LOOKUPTBLOPENERR)
  3204. #define DBIERR_DETAILTBLOPENERR    (ERRBASE_INTEGRITY + ERRCODE_DETAILTBLOPENERR)
  3205. #define DBIERR_MASTERTBLOPENERR    (ERRBASE_INTEGRITY + ERRCODE_MASTERTBLOPENERR)
  3206. #define DBIERR_FIELDISBLANK        (ERRBASE_INTEGRITY + ERRCODE_FIELDISBLANK)
  3207. #define DBIERR_MASTEREXISTS        (ERRBASE_INTEGRITY + ERRCODE_MASTEREXISTS)
  3208. #define DBIERR_MASTERTBLOPEN       (ERRBASE_INTEGRITY + ERRCODE_MASTERTBLOPEN)
  3209. #define DBIERR_DETAILTABLESEXIST   (ERRBASE_INTEGRITY + ERRCODE_DETAILTABLESEXIST)
  3210. #define DBIERR_DETAILRECEXISTEMPTY (ERRBASE_INTEGRITY + ERRCODE_DETAILRECEXISTEMPTY)
  3211. #define DBIERR_MASTERREFERENCEERR  (ERRBASE_INTEGRITY + ERRCODE_MASTERREFERENCEERR)
  3212. #define DBIERR_DETAILTBLOPEN       (ERRBASE_INTEGRITY + ERRCODE_DETAILTBLOPEN)
  3213. #define DBIERR_DEPENDENTSMUSTBEEMPTY  (ERRBASE_INTEGRITY + ERRCODE_DEPENDENTSMUSTBEEMPTY)
  3214. #define DBIERR_RINTREQINDEX        (ERRBASE_INTEGRITY + ERRCODE_RINTREQINDEX)
  3215. #define DBIERR_LINKEDTBLPROTECTED  (ERRBASE_INTEGRITY + ERRCODE_LINKEDTBLPROTECTED)
  3216. #define DBIERR_FIELDMULTILINKED    (ERRBASE_INTEGRITY + ERRCODE_FIELDMULTILINKED)
  3217.  
  3218.  
  3219.  
  3220. // ERRCAT_INVALIDREQ
  3221. // =================
  3222.  
  3223. #define  ERRCODE_OUTOFRANGE           1     // Number out of range (e.g field no)
  3224. #define  ERRCODE_INVALIDPARAM         2     // Generic invalid parameter
  3225. #define  ERRCODE_INVALIDFILENAME      3     // Invalid file name
  3226. #define  ERRCODE_NOSUCHFILE           4     // No such file
  3227. #define  ERRCODE_INVALIDOPTION        5     // Invalid option for a parameter
  3228. #define  ERRCODE_INVALIDHNDL          6     // Invalid handle to the function
  3229. #define  ERRCODE_UNKNOWNTBLTYPE       7     // Table type given not known
  3230. #define  ERRCODE_UNKNOWNFILE          8     // Dont know how to open file
  3231. #define  ERRCODE_PRIMARYKEYREDEFINE   9     // Cannot redefine primary key
  3232. #define  ERRCODE_INVALIDRINTDESCNUM   10    // 0x0a Cannot change this RINTDesc
  3233. #define  ERRCODE_KEYFLDTYPEMISMATCH   11    // 0x0b Foreign & Primary Key Mismatch
  3234. #define  ERRCODE_INVALIDMODIFYREQUEST 12    // 0x0c Invalid modify request
  3235. #define  ERRCODE_NOSUCHINDEX          13    // 0x0d Index does not exist
  3236. #define  ERRCODE_INVALIDBLOBOFFSET    14    // 0x0e Invalid Offset into the Blob
  3237. #define  ERRCODE_INVALIDDESCNUM       15    // 0x0f Invalid descriptor number
  3238. #define  ERRCODE_INVALIDFLDTYPE       16    // 0x10 Invalid field type
  3239. #define  ERRCODE_INVALIDFLDDESC       17    // 0x11 Invalid field descriptor
  3240. #define  ERRCODE_INVALIDFLDXFORM      18    // 0x12 Invalid field transform
  3241. #define  ERRCODE_INVALIDRECSTRUCT     19    // 0x13 Invalid record structure
  3242. #define  ERRCODE_INVALIDDESC          20    // 0x14 Generic: invalid descriptor
  3243. #define  ERRCODE_INVALIDINDEXSTRUCT   21    // 0x15 Invalid array of indexes descriptors
  3244. #define  ERRCODE_INVALIDVCHKSTRUCT    22    // 0x16 Invalid array of  val. check descriptors
  3245. #define  ERRCODE_INVALIDRINTSTRUCT    23    // 0x17 Invalid array of ref. integrity descriptors
  3246. #define  ERRCODE_INVALIDRESTRTBLORDER 24    // 0x18 Invalid ordering of tables during restructure
  3247. #define  ERRCODE_NAMENOTUNIQUE        25    // 0x19 Name not unique in this context
  3248. #define  ERRCODE_INDEXNAMEREQUIRED    26    // 0x1a Index name required
  3249. #define  ERRCODE_INVALIDSESHANDLE     27    // 0x1b Invalid ses handle
  3250. #define  ERRCODE_INVALIDRESTROP       28    // 0x1c Invalid restructure operation
  3251. #define  ERRCODE_UNKNOWNDRIVER        29    // 0x1d Driver not known to system
  3252. #define  ERRCODE_UNKNOWNDB            30    // 0x1e Unknown db
  3253. #define  ERRCODE_INVALIDPASSWORD      31    // 0x1f Invalid password given
  3254. #define  ERRCODE_NOCALLBACK           32    // 0x20 No callback function
  3255. #define  ERRCODE_INVALIDCALLBACKBUFLEN 33   // 0x21 Invalid callback buffer length
  3256. #define  ERRCODE_INVALIDDIR            34   // 0x22 Invalid directory
  3257. #define  ERRCODE_INVALIDXLATION        35   // 0x23 Translate Error - Translate DID NOT happen
  3258. #define  ERRCODE_DIFFERENTTABLES       36   // 0x24 Cannot Set Cursor of one Table to another
  3259. #define  ERRCODE_INVALIDBOOKMARK       37   // 0x25 Bookmarks does not match table, etc.
  3260. #define  ERRCODE_INVALIDINDEXNAME      38   // 0x26 Index/Tag Name is invalid
  3261. #define  ERRCODE_INVALIDIDXDESC        39   // 0x27 Invalid index descriptor
  3262. #define  ERRCODE_NOSUCHTABLE           40   // 0x28 No such table
  3263. #define  ERRCODE_USECOUNT              41   // 0x29 Table has too many users
  3264. #define  ERRCODE_INVALIDKEY            42   // 0x2a Key does not pass filter condition
  3265. #define  ERRCODE_INDEXEXISTS           43   // 0x2b Index already exists
  3266. #define  ERRCODE_INDEXOPEN             44   // 0x2c Index is open
  3267. #define  ERRCODE_INVALIDBLOBLEN        45   // 0x2d Invalid Blob Length
  3268. #define  ERRCODE_INVALIDBLOBHANDLE     46   // 0x2e Invalid Blob handle (in record buffer)
  3269. #define  ERRCODE_TABLEOPEN             47   // 0x2f Table is open
  3270. #define  ERRCODE_NEEDRESTRUCTURE       48   // 0x30 Need to do (hard) restructure
  3271. #define  ERRCODE_INVALIDMODE           49   // 0x31 Invalid mode
  3272. #define  ERRCODE_CANNOTCLOSE            50  // 0x32 Cannot close index
  3273. #define  ERRCODE_ACTIVEINDEX            51  // 0x33 Index is being used to order tbl
  3274. #define  ERRCODE_INVALIDUSRPASS         52  // 0x34 Bad user name or password
  3275. #define  ERRCODE_MULTILEVELCASCADE      53  // 0x35 Multi level Cascade not supported
  3276. #define  ERRCODE_INVALIDFIELDNAME       54  // 0x36 Invalid field name
  3277. #define  ERRCODE_INVALIDTABLENAME       55  // 0x37 Invalid table name
  3278. #define  ERRCODE_INVALIDLINKEXPR        56  // 0x38 Invalid linked cursor expression
  3279. #define  ERRCODE_NAMERESERVED           57  // 0x39 Name is reserved
  3280. #define  ERRCODE_INVALIDFILEEXTN        58  // 0x3a Invalid file extention
  3281. #define  ERRCODE_INVALIDLANGDRV         59  // 0x3b Invalid language driver
  3282. #define  ERRCODE_ALIASNOTOPEN           60  // 0x3c Requested alias in not open
  3283. #define  ERRCODE_INCOMPATRECSTRUCTS     61  // 0x3d Incompatible record structures
  3284. #define  ERRCODE_RESERVEDDOSNAME        62  // 0x3e Reserved dos name
  3285. #define  ERRCODE_DESTMUSTBEINDEXED      63  // 0x3f Destination must be indexed
  3286. #define  ERRCODE_INVALIDINDEXTYPE       64  // 0x40 Invalid index type
  3287. #define  ERRCODE_LANGDRVMISMATCH        65  // 0x41 Language driver of table and index do not match
  3288. #define  ERRCODE_NOSUCHFILTER           66  // 0x42 Filter handle is invalid
  3289. #define  ERRCODE_INVALIDFILTER          67  // 0x43 Invalid filter
  3290.  
  3291. #define  ERRCODE_INVALIDTABLECREATE     68  // 0x44 Bad table create request (exact prob unknown)
  3292. #define  ERRCODE_INVALIDTABLEDELETE     69  // 0x45 Bad table delete request (exact prob unknown)
  3293. #define  ERRCODE_INVALIDINDEXCREATE     70  // 0x46 Bad index create request (exact prob unknown)
  3294. #define  ERRCODE_INVALIDINDEXDELETE     71  // 0x47 Bad index delete request (exact prob unknown)
  3295. #define  ERRCODE_INVALIDTABLE           72  // 0x48 Invalid table name specified
  3296. #define  ERRCODE_MULTIRESULTS           73  // 0X49 Multi results
  3297. #define  ERRCODE_INVALIDTIME            74  // 0X4A Multi results
  3298. #define  ERRCODE_INVALIDDATE            75  // 0X4B Multi results
  3299. #define  ERRCODE_INVALIDTIMESTAMP       76  // 0X4C Multi results
  3300. #define  ERRCODE_DIFFERENTPATH          77  // 0X4d Tables in different paths
  3301. #define  ERRCODE_MISMATCHARGS           78  // 0x4e MisMatch in the # of arguments
  3302. #define  ERRCODE_FUNCTIONNOTFOUND       79  // 0x4f Loaderlib cant find a func in the DLL (bad version?)
  3303. #define  ERRCODE_MUSTUSEBASEORDER       80  // 0x50 Must use baseorder for this operation
  3304. #define  ERRCODE_INVALIDPROCEDURENAME   81  // 0x51 Invalid procedure name
  3305. #define  ERRCODE_INVALIDFLDMAP          82  // 0x52 invalid field map
  3306.  
  3307.  
  3308. #define  DBIERR_OUTOFRANGE           (ERRBASE_INVALIDREQ + ERRCODE_OUTOFRANGE)
  3309. #define  DBIERR_INVALIDPARAM         (ERRBASE_INVALIDREQ + ERRCODE_INVALIDPARAM)
  3310. #define  DBIERR_INVALIDFILENAME      (ERRBASE_INVALIDREQ + ERRCODE_INVALIDFILENAME)
  3311. #define  DBIERR_NOSUCHFILE           (ERRBASE_INVALIDREQ + ERRCODE_NOSUCHFILE)
  3312. #define  DBIERR_INVALIDOPTION        (ERRBASE_INVALIDREQ + ERRCODE_INVALIDOPTION)
  3313. #define  DBIERR_INVALIDHNDL          (ERRBASE_INVALIDREQ + ERRCODE_INVALIDHNDL)
  3314. #define  DBIERR_UNKNOWNTBLTYPE       (ERRBASE_INVALIDREQ + ERRCODE_UNKNOWNTBLTYPE)
  3315. #define  DBIERR_UNKNOWNFILE          (ERRBASE_INVALIDREQ + ERRCODE_UNKNOWNFILE)
  3316. #define  DBIERR_PRIMARYKEYREDEFINE   (ERRBASE_INVALIDREQ + ERRCODE_PRIMARYKEYREDEFINE)
  3317. #define  DBIERR_INVALIDRINTDESCNUM   (ERRBASE_INVALIDREQ + ERRCODE_INVALIDRINTDESCNUM)
  3318. #define  DBIERR_KEYFLDTYPEMISMATCH   (ERRBASE_INVALIDREQ + ERRCODE_KEYFLDTYPEMISMATCH)
  3319. #define  DBIERR_INVALIDMODIFYREQUEST (ERRBASE_INVALIDREQ + ERRCODE_INVALIDMODIFYREQUEST)
  3320. #define  DBIERR_NOSUCHINDEX          (ERRBASE_INVALIDREQ + ERRCODE_NOSUCHINDEX)
  3321. #define  DBIERR_INVALIDBLOBOFFSET    (ERRBASE_INVALIDREQ + ERRCODE_INVALIDBLOBOFFSET)
  3322. #define  DBIERR_INVALIDDESCNUM       (ERRBASE_INVALIDREQ + ERRCODE_INVALIDDESCNUM)
  3323. #define  DBIERR_INVALIDFLDTYPE       (ERRBASE_INVALIDREQ +  ERRCODE_INVALIDFLDTYPE)
  3324. #define  DBIERR_INVALIDFLDDESC       (ERRBASE_INVALIDREQ + ERRCODE_INVALIDFLDDESC)
  3325. #define  DBIERR_INVALIDFLDXFORM      (ERRBASE_INVALIDREQ + ERRCODE_INVALIDFLDXFORM)
  3326. #define  DBIERR_INVALIDRECSTRUCT     (ERRBASE_INVALIDREQ + ERRCODE_INVALIDRECSTRUCT)
  3327. #define  DBIERR_INVALIDDESC          (ERRBASE_INVALIDREQ + ERRCODE_INVALIDDESC)
  3328. #define  DBIERR_INVALIDINDEXSTRUCT   (ERRBASE_INVALIDREQ + ERRCODE_INVALIDINDEXSTRUCT)
  3329. #define  DBIERR_INVALIDVCHKSTRUCT    (ERRBASE_INVALIDREQ + ERRCODE_INVALIDVCHKSTRUCT)
  3330. #define  DBIERR_INVALIDRINTSTRUCT    (ERRBASE_INVALIDREQ + ERRCODE_INVALIDRINTSTRUCT)
  3331. #define  DBIERR_INVALIDRESTRTBLORDER (ERRBASE_INVALIDREQ + ERRCODE_INVALIDRESTRTBLORDER)
  3332. #define  DBIERR_NAMENOTUNIQUE        (ERRBASE_INVALIDREQ + ERRCODE_NAMENOTUNIQUE)
  3333. #define  DBIERR_INDEXNAMEREQUIRED    (ERRBASE_INVALIDREQ + ERRCODE_INDEXNAMEREQUIRED)
  3334. #define  DBIERR_INVALIDSESHANDLE     (ERRBASE_INVALIDREQ + ERRCODE_INVALIDSESHANDLE)
  3335. #define  DBIERR_INVALIDRESTROP       (ERRBASE_INVALIDREQ + ERRCODE_INVALIDRESTROP)
  3336. #define  DBIERR_UNKNOWNDRIVER        (ERRBASE_INVALIDREQ + ERRCODE_UNKNOWNDRIVER)
  3337. #define  DBIERR_UNKNOWNDB            (ERRBASE_INVALIDREQ + ERRCODE_UNKNOWNDB)
  3338. #define  DBIERR_INVALIDPASSWORD      (ERRBASE_INVALIDREQ + ERRCODE_INVALIDPASSWORD)
  3339. #define  DBIERR_NOCALLBACK           (ERRBASE_INVALIDREQ + ERRCODE_NOCALLBACK)
  3340. #define  DBIERR_INVALIDCALLBACKBUFLEN \
  3341.   (ERRBASE_INVALIDREQ + ERRCODE_INVALIDCALLBACKBUFLEN )
  3342. #define  DBIERR_INVALIDDIR          (ERRBASE_INVALIDREQ + ERRCODE_INVALIDDIR)
  3343. #define  DBIERR_INVALIDXLATION      (ERRBASE_INVALIDREQ + ERRCODE_INVALIDXLATION)
  3344. #define  DBIERR_DIFFERENTTABLES     (ERRBASE_INVALIDREQ + ERRCODE_DIFFERENTTABLES)
  3345. #define  DBIERR_INVALIDBOOKMARK     (ERRBASE_INVALIDREQ + ERRCODE_INVALIDBOOKMARK)
  3346. #define  DBIERR_INVALIDINDEXNAME    (ERRBASE_INVALIDREQ + ERRCODE_INVALIDINDEXNAME)
  3347. #define  DBIERR_INVALIDIDXDESC      (ERRBASE_INVALIDREQ + ERRCODE_INVALIDIDXDESC)
  3348. #define  DBIERR_NOSUCHTABLE         (ERRBASE_INVALIDREQ + ERRCODE_NOSUCHTABLE)
  3349. #define  DBIERR_USECOUNT            (ERRBASE_INVALIDREQ + ERRCODE_USECOUNT)
  3350. #define  DBIERR_INVALIDKEY          (ERRBASE_INVALIDREQ + ERRCODE_INVALIDKEY)
  3351. #define  DBIERR_INDEXEXISTS         (ERRBASE_INVALIDREQ + ERRCODE_INDEXEXISTS)
  3352. #define  DBIERR_INDEXOPEN           (ERRBASE_INVALIDREQ + ERRCODE_INDEXOPEN)
  3353. #define  DBIERR_INVALIDBLOBLEN      (ERRBASE_INVALIDREQ + ERRCODE_INVALIDBLOBLEN)
  3354. #define  DBIERR_INVALIDBLOBHANDLE   (ERRBASE_INVALIDREQ + ERRCODE_INVALIDBLOBHANDLE)
  3355. #define  DBIERR_TABLEOPEN           (ERRBASE_INVALIDREQ + ERRCODE_TABLEOPEN)
  3356. #define  DBIERR_NEEDRESTRUCTURE     (ERRBASE_INVALIDREQ + ERRCODE_NEEDRESTRUCTURE)
  3357. #define  DBIERR_INVALIDMODE         (ERRBASE_INVALIDREQ + ERRCODE_INVALIDMODE)
  3358. #define  DBIERR_CANNOTCLOSE         (ERRBASE_INVALIDREQ + ERRCODE_CANNOTCLOSE)
  3359. #define  DBIERR_ACTIVEINDEX         (ERRBASE_INVALIDREQ + ERRCODE_ACTIVEINDEX)
  3360. #define  DBIERR_INVALIDUSRPASS      (ERRBASE_INVALIDREQ + ERRCODE_INVALIDUSRPASS)
  3361. #define  DBIERR_MULTILEVELCASCADE   (ERRBASE_INVALIDREQ + ERRCODE_MULTILEVELCASCADE)
  3362. #define  DBIERR_INVALIDFIELDNAME    (ERRBASE_INVALIDREQ + ERRCODE_INVALIDFIELDNAME)
  3363. #define  DBIERR_INVALIDTABLENAME    (ERRBASE_INVALIDREQ + ERRCODE_INVALIDTABLENAME)
  3364. #define  DBIERR_INVALIDLINKEXPR     (ERRBASE_INVALIDREQ + ERRCODE_INVALIDLINKEXPR)
  3365. #define  DBIERR_NAMERESERVED        (ERRBASE_INVALIDREQ + ERRCODE_NAMERESERVED)
  3366. #define  DBIERR_INVALIDFILEEXTN     (ERRBASE_INVALIDREQ + ERRCODE_INVALIDFILEEXTN)
  3367. #define  DBIERR_INVALIDLANGDRV      (ERRBASE_INVALIDREQ + ERRCODE_INVALIDLANGDRV)
  3368. #define  DBIERR_ALIASNOTOPEN        (ERRBASE_INVALIDREQ + ERRCODE_ALIASNOTOPEN)
  3369. #define  DBIERR_INCOMPATRECSTRUCTS  (ERRBASE_INVALIDREQ + ERRCODE_INCOMPATRECSTRUCTS)
  3370. #define  DBIERR_RESERVEDOSNAME      (ERRBASE_INVALIDREQ + ERRCODE_RESERVEDDOSNAME)
  3371. #define  DBIERR_DESTMUSTBEINDEXED   (ERRBASE_INVALIDREQ + ERRCODE_DESTMUSTBEINDEXED)
  3372. #define  DBIERR_INVALIDINDEXTYPE    (ERRBASE_INVALIDREQ + ERRCODE_INVALIDINDEXTYPE)
  3373. #define  DBIERR_LANGDRVMISMATCH     (ERRBASE_INVALIDREQ + ERRCODE_LANGDRVMISMATCH)
  3374. #define  DBIERR_NOSUCHFILTER        (ERRBASE_INVALIDREQ + ERRCODE_NOSUCHFILTER)
  3375. #define  DBIERR_INVALIDFILTER       (ERRBASE_INVALIDREQ + ERRCODE_INVALIDFILTER)
  3376. #define  DBIERR_INVALIDTABLECREATE  (ERRBASE_INVALIDREQ + ERRCODE_INVALIDTABLECREATE)
  3377. #define  DBIERR_INVALIDTABLEDELETE  (ERRBASE_INVALIDREQ + ERRCODE_INVALIDTABLEDELETE)
  3378. #define  DBIERR_INVALIDINDEXCREATE  (ERRBASE_INVALIDREQ + ERRCODE_INVALIDINDEXCREATE)
  3379. #define  DBIERR_INVALIDINDEXDELETE  (ERRBASE_INVALIDREQ + ERRCODE_INVALIDINDEXDELETE)
  3380. #define  DBIERR_INVALIDTABLE        (ERRBASE_INVALIDREQ + ERRCODE_INVALIDTABLE)
  3381. #define  DBIERR_MULTIRESULTS        (ERRBASE_INVALIDREQ + ERRCODE_MULTIRESULTS)
  3382. #define  DBIERR_INVALIDTIME         (ERRBASE_INVALIDREQ + ERRCODE_INVALIDTIME)
  3383. #define  DBIERR_INVALIDDATE         (ERRBASE_INVALIDREQ + ERRCODE_INVALIDDATE)
  3384. #define  DBIERR_INVALIDTIMESTAMP    (ERRBASE_INVALIDREQ + ERRCODE_INVALIDTIMESTAMP)
  3385. #define  DBIERR_DIFFERENTPATH       (ERRBASE_INVALIDREQ + ERRCODE_DIFFERENTPATH)
  3386. #define  DBIERR_MISMATCHARGS        (ERRBASE_INVALIDREQ + ERRCODE_MISMATCHARGS)
  3387. #define  DBIERR_FUNCTIONNOTFOUND    (ERRBASE_INVALIDREQ + ERRCODE_FUNCTIONNOTFOUND)
  3388. #define  DBIERR_MUSTUSEBASEORDER    (ERRBASE_INVALIDREQ + ERRCODE_MUSTUSEBASEORDER)
  3389. #define  DBIERR_INVALIDPROCEDURENAME (ERRBASE_INVALIDREQ + ERRCODE_INVALIDPROCEDURENAME)
  3390. #define  DBIERR_INVALIDFLDMAP       (ERRBASE_INVALIDREQ + ERRCODE_INVALIDFLDMAP)
  3391.  
  3392. // ERRCAT_LOCKCONFLICT
  3393. // ===================
  3394.  
  3395. #define ERRCODE_LOCKED           1
  3396. #define ERRCODE_UNLOCKFAILED     2
  3397. #define ERRCODE_FILEBUSY         3
  3398. #define ERRCODE_DIRBUSY          4
  3399. #define ERRCODE_FILELOCKED       5
  3400. #define ERRCODE_DIRLOCKED        6
  3401. #define ERRCODE_ALREADYLOCKED    7
  3402. #define ERRCODE_NOTLOCKED        8
  3403. #define ERRCODE_LOCKTIMEOUT      9
  3404. #define ERRCODE_GROUPLOCKED      10    // 0x0a
  3405. #define ERRCODE_LOSTTBLLOCK      11    // 0x0b
  3406. #define ERRCODE_LOSTEXCLACCESS   12    // 0x0c
  3407. #define ERRCODE_NEEDEXCLACCESS   13    // 0x0d
  3408. #define ERRCODE_RECGROUPCONFLICT 14    // 0x0e
  3409. #define ERRCODE_DEADLOCK         15
  3410. #define ERRCODE_ACTIVETRAN       16
  3411. #define ERRCODE_NOACTIVETRAN     17
  3412. #define ERRCODE_RECLOCKFAILED    18
  3413. #define ERRCODE_OPTRECLOCKFAILED 19
  3414. #define ERRCODE_OPTRECLOCKRECDEL 20
  3415. #define ERRCODE_LOCKEDRECS       21
  3416. #define ERRCODE_NEEDWRITELOCK    22
  3417.  
  3418. #define DBIERR_LOCKED            (ERRBASE_LOCKCONFLICT + ERRCODE_LOCKED)
  3419. #define DBIERR_UNLOCKFAILED      (ERRBASE_LOCKCONFLICT + ERRCODE_UNLOCKFAILED)
  3420. #define DBIERR_FILEBUSY          (ERRBASE_LOCKCONFLICT + ERRCODE_FILEBUSY)
  3421. #define DBIERR_DIRBUSY           (ERRBASE_LOCKCONFLICT + ERRCODE_DIRBUSY)
  3422. #define DBIERR_FILELOCKED        (ERRBASE_LOCKCONFLICT + ERRCODE_FILELOCKED)
  3423. #define DBIERR_DIRLOCKED         (ERRBASE_LOCKCONFLICT + ERRCODE_DIRLOCKED)
  3424. #define DBIERR_ALREADYLOCKED     (ERRBASE_LOCKCONFLICT + ERRCODE_ALREADYLOCKED)
  3425. #define DBIERR_NOTLOCKED         (ERRBASE_LOCKCONFLICT + ERRCODE_NOTLOCKED)
  3426. #define DBIERR_LOCKTIMEOUT       (ERRBASE_LOCKCONFLICT + ERRCODE_LOCKTIMEOUT)
  3427. #define DBIERR_GROUPLOCKED       (ERRBASE_LOCKCONFLICT + ERRCODE_GROUPLOCKED)
  3428. #define DBIERR_LOSTTBLLOCK       (ERRBASE_LOCKCONFLICT + ERRCODE_LOSTTBLLOCK)
  3429. #define DBIERR_LOSTEXCLACCESS    (ERRBASE_LOCKCONFLICT + ERRCODE_LOSTEXCLACCESS)
  3430. #define DBIERR_NEEDEXCLACCESS    (ERRBASE_LOCKCONFLICT  + ERRCODE_NEEDEXCLACCESS)
  3431. #define DBIERR_RECGROUPCONFLICT  (ERRBASE_LOCKCONFLICT + ERRCODE_RECGROUPCONFLICT)
  3432. #define DBIERR_DEADLOCK          (ERRBASE_LOCKCONFLICT + ERRCODE_DEADLOCK)
  3433. #define DBIERR_ACTIVETRAN        (ERRBASE_LOCKCONFLICT + ERRCODE_ACTIVETRAN)
  3434. #define DBIERR_NOACTIVETRAN      (ERRBASE_LOCKCONFLICT + ERRCODE_NOACTIVETRAN)
  3435. #define DBIERR_RECLOCKFAILED     (ERRBASE_LOCKCONFLICT + ERRCODE_RECLOCKFAILED)
  3436. #define DBIERR_OPTRECLOCKFAILED  (ERRBASE_LOCKCONFLICT + ERRCODE_OPTRECLOCKFAILED)
  3437. #define DBIERR_OPTRECLOCKRECDEL  (ERRBASE_LOCKCONFLICT + ERRCODE_OPTRECLOCKRECDEL)
  3438.  
  3439. // ERRCAT_SECURITY
  3440. // ===============
  3441.  
  3442. #define ERRCODE_NOTSUFFFIELDRIGHTS   1        // Not sufficient field  rights for operation
  3443. #define ERRCODE_NOTSUFFTABLERIGHTS   2        // Not sufficient table  rights for operation
  3444. #define ERRCODE_NOTSUFFFAMILYRIGHTS  3        // Not sufficient family rights for operation
  3445. #define ERRCODE_READONLYDIR          4        // Is a read-only directory
  3446. #define ERRCODE_READONLYDB           5        // Database is read-only
  3447. #define ERRCODE_READONLYFLD          6        // Trying to modify read-only field
  3448. #define ERRCODE_TBLENCRYPTED         7        // Table is encrypted (dBASE only)
  3449. #define ERRCODE_NOTSUFFSQLRIGHTS     8        // Not sufficient sql rights for operation
  3450.  
  3451.  
  3452. #define DBIERR_NOTSUFFFIELDRIGHTS  (ERRBASE_SEC + ERRCODE_NOTSUFFFIELDRIGHTS)
  3453. #define DBIERR_NOTSUFFTABLERIGHTS  (ERRBASE_SEC + ERRCODE_NOTSUFFTABLERIGHTS)
  3454. #define DBIERR_NOTSUFFFAMILYRIGHTS (ERRBASE_SEC + ERRCODE_NOTSUFFFAMILYRIGHTS)
  3455. #define DBIERR_READONLYDIR         (ERRBASE_SEC + ERRCODE_READONLYDIR)
  3456. #define DBIERR_READONLYDB          (ERRBASE_SEC + ERRCODE_READONLYDB)
  3457. #define DBIERR_READONLYFLD         (ERRBASE_SEC + ERRCODE_READONLYFLD)
  3458. #define DBIERR_TBLENCRYPTED        (ERRBASE_SEC + ERRCODE_TBLENCRYPTED)
  3459. #define DBIERR_NOTSUFFSQLRIGHTS    (ERRBASE_SEC + ERRCODE_NOTSUFFSQLRIGHTS)
  3460.  
  3461.  
  3462. // ERRCAT_INVALIDCONTEXT
  3463. // =====================
  3464.  
  3465. #define ERRCODE_NOTABLOB         1        // Field is not a blob
  3466. #define ERRCODE_BLOBOPENED       2        // Blob already opened
  3467. #define ERRCODE_BLOBNOTOPENED    3        // Blob not opened
  3468. #define ERRCODE_NA               4        // Operation not applicable
  3469. #define ERRCODE_NOTINDEXED       5        // Table is not indexed
  3470. #define ERRCODE_NOTINITIALIZED   6        // Engine not initialized
  3471. #define ERRCODE_MULTIPLEINIT     7        // Attempt to re-initialize engine
  3472. #define ERRCODE_NOTSAMESESSION   8        // Attempt to mix objs from diff ses
  3473. #define ERRCODE_PDXDRIVERNOTACTIVE 9      // Paradox driver not active
  3474. #define ERRCODE_DRIVERNOTLOADED  10       // 0x0a Driver not loaded
  3475. #define ERRCODE_TABLEREADONLY    11       // 0x0b Table is read only
  3476. #define ERRCODE_NOASSOCINDEX     12       // 0x0c No index associated with the cursor
  3477. #define ERRCODE_HASOPENCURSORS   13       // 0x0d Has open cursors
  3478. #define ERRCODE_NOTABLESUPPORT   14       // 0x0e Op cannot be done on this table
  3479. #define ERRCODE_INDEXREADONLY    15       // 0x0f Index is read only
  3480. #define ERRCODE_NOUNIQUERECS     16       // 0x10 Records are not unique
  3481. #define ERRCODE_NOTCURSESSION    17       // 0x11 Not the current/active session
  3482. #define ERRCODE_INVALIDKEYWORD   18       // 0x12 Invalid use of keyword.
  3483. #define ERRCODE_CONNECTINUSE     19       // 0x13 Connection in use
  3484. #define ERRCODE_CONNECTNOTSHARED 20       // 0x14 Passthru SQL connection not share
  3485.  
  3486.  
  3487. #define DBIERR_NOTABLOB           (ERRBASE_IC + ERRCODE_NOTABLOB)
  3488. #define DBIERR_BLOBOPENED         (ERRBASE_IC + ERRCODE_BLOBOPENED)
  3489. #define DBIERR_BLOBNOTOPENED      (ERRBASE_IC + ERRCODE_BLOBNOTOPENED)
  3490. #define DBIERR_NA                 (ERRBASE_IC + ERRCODE_NA)
  3491. #define DBIERR_NOTINDEXED         (ERRBASE_IC + ERRCODE_NOTINDEXED)
  3492. #define DBIERR_NOTINITIALIZED     (ERRBASE_IC + ERRCODE_NOTINITIALIZED)
  3493. #define DBIERR_MULTIPLEINIT       (ERRBASE_IC + ERRCODE_MULTIPLEINIT)
  3494. #define DBIERR_NOTSAMESESSION     (ERRBASE_IC + ERRCODE_NOTSAMESESSION)
  3495. #define DBIERR_PDXDRIVERNOTACTIVE (ERRBASE_IC + ERRCODE_PDXDRIVERNOTACTIVE)
  3496. #define DBIERR_DRIVERNOTLOADED    (ERRBASE_IC + ERRCODE_DRIVERNOTLOADED)
  3497. #define DBIERR_TABLEREADONLY      (ERRBASE_IC + ERRCODE_TABLEREADONLY)
  3498. #define DBIERR_NOASSOCINDEX       (ERRBASE_IC + ERRCODE_NOASSOCINDEX)
  3499. #define DBIERR_HASOPENCURSORS     (ERRBASE_IC + ERRCODE_HASOPENCURSORS)
  3500. #define DBIERR_NOTABLESUPPORT     (ERRBASE_IC + ERRCODE_NOTABLESUPPORT)
  3501. #define DBIERR_INDEXREADONLY      (ERRBASE_IC + ERRCODE_INDEXREADONLY)
  3502. #define DBIERR_NOUNIQUERECS       (ERRBASE_IC + ERRCODE_NOUNIQUERECS)
  3503. #define DBIERR_NOTCURSESSION      (ERRBASE_IC + ERRCODE_NOTCURSESSION)
  3504. #define DBIERR_INVALIDKEYWORD     (ERRBASE_IC + ERRCODE_INVALIDKEYWORD)
  3505. #define DBIERR_CONNECTINUSE       (ERRBASE_IC + ERRCODE_CONNECTINUSE)
  3506. #define DBIERR_CONNECTNOTSHARED   (ERRBASE_IC + ERRCODE_CONNECTNOTSHARED)
  3507.  
  3508.  
  3509. // ERRCAT_OS
  3510. // =========
  3511. // DOS extended errors:
  3512.  
  3513. #define ERRCODE_OSEINVFNC     1        // Invalid function number
  3514. #define ERRCODE_OSENOENT      2        // No such file or directory
  3515. #define ERRCODE_OSENOPATH     3        // Path not found
  3516. #define ERRCODE_OSEMFILE      4        // Too many open files
  3517. #define ERRCODE_OSEACCES      5        // Permission denied
  3518. #define ERRCODE_OSEBADF       6        // Bad file number
  3519. #define ERRCODE_OSECONTR      7        // Memory blocks destroyed
  3520. #define ERRCODE_OSENOMEM      8        // Not enough core
  3521. #define ERRCODE_OSEINVMEM     9        // Invalid memory block address
  3522. #define ERRCODE_OSEINVENV     10       // 0x0a Invalid environment
  3523. #define ERRCODE_OSEINVFMT     11       // 0x0b Invalid format
  3524. #define ERRCODE_OSEINVACC     12       // 0x0c Invalid access code
  3525. #define ERRCODE_OSEINVDAT     13       // 0x0d Invalid data
  3526. #define ERRCODE_OSENODEV      15       // 0x0f No such device
  3527. #define ERRCODE_OSECURDIR     16       // 0x10 Attempt to remove curdir
  3528. #define ERRCODE_OSENOTSAM     17       // 0x11 Not same device
  3529. #define ERRCODE_OSENMFILE     18       // 0x12 No more files
  3530. #define ERRCODE_OSEINVAL      19       // 0x13 Invalid argument
  3531. #define ERRCODE_OSE2BIG       20       // 0x14 Arg list too long
  3532. #define ERRCODE_OSENOEXEC     21       // 0x15 Exec format error
  3533. #define ERRCODE_OSEXDEV       22       // 0x16 Cross-device link
  3534. #define ERRCODE_OSEDOM        33       // 0x21 Math argument
  3535. #define ERRCODE_OSERANGE      34       // 0x22 Result to large
  3536. #define ERRCODE_OSEEXIST      35       // 0x23 File already exists
  3537. #define ERRCODE_OSUNKNOWN     39       // 0x27 Unkown | illegal error from rtl
  3538.  
  3539. #define ERRCODE_OSSHAREVIOL   50       // 0x32 Share viol, ext. err 0x20
  3540. #define ERRCODE_OSLOCKVIOL    51       // 0x33 Lock viol, ext. err 0x21
  3541. #define ERRCODE_OSINT24FAIL   52       // 0x34 INT24 called
  3542. #define ERRCODE_OSDRIVENOTREADY   53   // 0x35 Drive not ready
  3543.  
  3544.  
  3545.  
  3546. // OTHER Os errors:
  3547. // 1. idapi errors
  3548. // 2. errors from non-dos systems ( i.e. NOVELL )
  3549.  
  3550. #define ERRCODE_NOTEXACT          100       // 0x64 Not exact read/write
  3551. #define ERRCODE_OSNETERR          101       // 0x65 Generic network error
  3552. #define ERRCODE_OSUNKNOWNSRVERR   102       // 0x66 Error from file server
  3553. #define ERRCODE_SERVERNOMEMORY    103       // 0x67 Server out of memory
  3554. #define ERRCODE_OSALREADYLOCKED   104       // 0x68 Record already locked (by you)
  3555. #define ERRCODE_OSNOTLOCKED       105       // 0x69 Record not locked
  3556. #define ERRCODE_NOSERVERSW        106       // 0x6a Server software not running the workstation/server
  3557.  
  3558.  
  3559.  
  3560. #define   DBIERR_OSEINVFNC       ( ERRBASE_OS + ERRCODE_OSEINVFNC )
  3561. #define   DBIERR_OSENOENT        ( ERRBASE_OS + ERRCODE_OSENOENT )
  3562. #define   DBIERR_OSENOPATH       ( ERRBASE_OS + ERRCODE_OSENOPATH )
  3563. #define   DBIERR_OSEMFILE        ( ERRBASE_OS + ERRCODE_OSEMFILE )
  3564. #define   DBIERR_OSEACCES        ( ERRBASE_OS + ERRCODE_OSEACCES )
  3565. #define   DBIERR_OSEBADF         ( ERRBASE_OS + ERRCODE_OSEBADF )
  3566. #define   DBIERR_OSECONTR        ( ERRBASE_OS + ERRCODE_OSECONTR )
  3567. #define   DBIERR_OSENOMEM        ( ERRBASE_OS + ERRCODE_OSENOMEM )
  3568. #define   DBIERR_OSEINVMEM       ( ERRBASE_OS + ERRCODE_OSEINVMEM )
  3569. #define   DBIERR_OSEINVENV       ( ERRBASE_OS + ERRCODE_OSEINVENV )
  3570. #define   DBIERR_OSEINVFMT       ( ERRBASE_OS + ERRCODE_OSEINVFMT )
  3571. #define   DBIERR_OSEINVACC       ( ERRBASE_OS + ERRCODE_OSEINVACC )
  3572. #define   DBIERR_OSEINVDAT       ( ERRBASE_OS + ERRCODE_OSEINVDAT )
  3573. #define   DBIERR_OSENODEV        ( ERRBASE_OS + ERRCODE_OSENODEV )
  3574. #define   DBIERR_OSECURDIR       ( ERRBASE_OS + ERRCODE_OSECURDIR )
  3575. #define   DBIERR_OSENOTSAM       ( ERRBASE_OS + ERRCODE_OSENOTSAM )
  3576. #define   DBIERR_OSENMFILE       ( ERRBASE_OS + ERRCODE_OSENMFILE )
  3577. #define   DBIERR_OSEINVAL        ( ERRBASE_OS + ERRCODE_OSEINVAL )
  3578. #define   DBIERR_OSE2BIG         ( ERRBASE_OS + ERRCODE_OSE2BIG )
  3579. #define   DBIERR_OSENOEXEC       ( ERRBASE_OS + ERRCODE_OSENOEXEC )
  3580. #define   DBIERR_OSEXDEV         ( ERRBASE_OS + ERRCODE_OSEXDEV )
  3581. #define   DBIERR_OSEDOM          ( ERRBASE_OS + ERRCODE_OSEDOM )
  3582. #define   DBIERR_OSERANGE        ( ERRBASE_OS + ERRCODE_OSERANGE )
  3583. #define   DBIERR_OSEEXIST        ( ERRBASE_OS + ERRCODE_OSEEXIST )
  3584. #define   DBIERR_OSUNKNOWN       ( ERRBASE_OS + ERRCODE_OSUNKNOWN )
  3585. #define   DBIERR_OSSHAREVIOL     ( ERRBASE_OS + ERRCODE_OSSHAREVIOL )
  3586. #define   DBIERR_OSLOCKVIOL      ( ERRBASE_OS + ERRCODE_OSLOCKVIOL )
  3587. #define   DBIERR_OSNETERR        ( ERRBASE_OS + ERRCODE_OSNETERR )
  3588. #define   DBIERR_OSINT24FAIL     ( ERRBASE_OS + ERRCODE_OSINT24FAIL )
  3589. #define   DBIERR_OSDRIVENOTREADY ( ERRBASE_OS + ERRCODE_OSDRIVENOTREADY )
  3590.  
  3591.  
  3592. #define   DBIERR_NOTEXACT        ( ERRBASE_OS + ERRCODE_NOTEXACT )
  3593. #define   DBIERR_OSUNKNOWNSRVERR ( ERRBASE_OS + ERRCODE_OSUNKNOWNSRVERR )
  3594. #define   DBIERR_SERVERNOMEMORY  ( ERRBASE_OS + ERRCODE_SERVERNOMEMORY )
  3595. #define   DBIERR_OSALREADYLOCKED ( ERRBASE_OS + ERRCODE_OSALREADYLOCKED )
  3596. #define   DBIERR_OSNOTLOCKED     ( ERRBASE_OS + ERRCODE_OSNOTLOCKED )
  3597. #define   DBIERR_NOSERVERSW      ( ERRBASE_OS + ERRCODE_NOSERVERSW)
  3598.  
  3599. // ERRCAT_NETWORK
  3600. // ==============
  3601.  
  3602. #define ERRCODE_NETINITERR       1        // Net init failed
  3603. #define ERRCODE_NETUSERLIMIT     2        // Net user limit exceeded
  3604. #define ERRCODE_NETFILEVERSION   3        // Wrong net file version
  3605. #define ERRCODE_NETFILELOCKED    4        // Not able to lock net file
  3606. #define ERRCODE_DIRNOTPRIVATE    5        //
  3607. #define ERRCODE_NETMULTIPLE      6        // Multiple net files in use
  3608. #define ERRCODE_NETUNKNOWN       7        // Unknown net error
  3609. #define ERRCODE_SHAREDFILE       8        // Cannot access a shared file
  3610. #define ERRCODE_SHARENOTLOADED   9        // Share not loaded
  3611. #define ERRCODE_NOTONANETWORK    10       // 0x0a Not an Network
  3612. #define ERRCODE_SQLCOMMLOST      11       // 0x0b Lost Communication with SQL server
  3613. #define ERRCODE_SERVERCOMMLOST   12       // 0x0c Lost Communication with IDAPI server
  3614. #define ERRCODE_SQLSERVERNOTFOUND 13      // 0x0d SQL Server not found
  3615. #define ERRCODE_SERVERNOTFOUND   14       // 0x0e SQL Server not found
  3616.  
  3617. #define DBIERR_NETINITERR        (ERRBASE_NETWORK + ERRCODE_NETINITERR)
  3618. #define DBIERR_NETUSERLIMIT      (ERRBASE_NETWORK + ERRCODE_NETUSERLIMIT)
  3619. #define DBIERR_NETFILEVERSION    (ERRBASE_NETWORK + ERRCODE_NETFILEVERSION)
  3620. #define DBIERR_NETFILELOCKED     (ERRBASE_NETWORK + ERRCODE_NETFILELOCKED)
  3621. #define DBIERR_DIRNOTPRIVATE     (ERRBASE_NETWORK + ERRCODE_DIRNOTPRIVATE)
  3622. #define DBIERR_NETMULTIPLE       (ERRBASE_NETWORK + ERRCODE_NETMULTIPLE)
  3623. #define DBIERR_NETUNKNOWN        (ERRBASE_NETWORK + ERRCODE_NETUNKNOWN)
  3624. #define DBIERR_SHAREDFILE        (ERRBASE_NETWORK + ERRCODE_SHAREDFILE)
  3625. #define DBIERR_SHARENOTLOADED    (ERRBASE_NETWORK + ERRCODE_SHARENOTLOADED)
  3626. #define DBIERR_NOTONANETWORK     (ERRBASE_NETWORK + ERRCODE_NOTONANETWORK)
  3627. #define DBIERR_SQLCOMMLOST       (ERRBASE_NETWORK + ERRCODE_SQLCOMMLOST)
  3628. #define DBIERR_SERVERCOMMLOST    (ERRBASE_NETWORK + ERRCODE_SERVERCOMMLOST)
  3629. #define DBIERR_SQLSERVERNOTFOUND (ERRBASE_NETWORK + ERRCODE_SQLSERVERNOTFOUND)
  3630. #define DBIERR_SERVERNOTFOUND    (ERRBASE_NETWORK + ERRCODE_SERVERNOTFOUND)
  3631.  
  3632. // ERRCAT_DRIVER
  3633. // =============
  3634.  
  3635. #define ERRCODE_WRONGDRVNAME    1       // Wrong driver name
  3636. #define ERRCODE_WRONGSYSVER     2       // Wrong system version
  3637. #define ERRCODE_WRONGDRVVER     3       // Wrong driver version
  3638. #define ERRCODE_WRONGDRVTYPE    4       // Wrong driver type
  3639. #define ERRCODE_CANNOTLOADDRV   5       // Can not load driver
  3640. #define ERRCODE_CANNOTLOADLDDRV   6     // Can not load language driver
  3641. #define ERRCODE_VENDINITFAIL    7       // Vendor init failure
  3642. #define ERRCODE_DRIVERRESTRICTED  8     // Client not enabled for this driver
  3643.  
  3644.  
  3645. #define DBIERR_WRONGDRVNAME     (ERRBASE_DRIVER + ERRCODE_WRONGDRVNAME)
  3646. #define DBIERR_WRONGSYSVER      (ERRBASE_DRIVER + ERRCODE_WRONGSYSVER)
  3647. #define DBIERR_WRONGDRVVER      (ERRBASE_DRIVER + ERRCODE_WRONGDRVVER)
  3648. #define DBIERR_WRONGDRVTYPE     (ERRBASE_DRIVER + ERRCODE_WRONGDRVTYPE)
  3649. #define DBIERR_CANNOTLOADDRV    (ERRBASE_DRIVER + ERRCODE_CANNOTLOADDRV)
  3650. #define DBIERR_CANNOTLOADLDDRV  (ERRBASE_DRIVER + ERRCODE_CANNOTLOADLDDRV)
  3651. #define DBIERR_VENDINITFAIL     (ERRBASE_DRIVER + ERRCODE_VENDINITFAIL)
  3652. #define DBIERR_DRIVERRESTRICTED (ERRBASE_DRIVER + ERRCODE_DRIVERRESTRICTED)
  3653.  
  3654.  
  3655. // ERRCAT_QUERY
  3656. // ============
  3657.  
  3658.  
  3659.  
  3660. #define DBICODE_AMBJOASY       1 // obsolete
  3661. #define DBICODE_AMBJOSYM       2 // obsolete
  3662. #define DBICODE_AMBOUTEX       3
  3663. #define DBICODE_AMBOUTPR       4 // obsolete
  3664. #define DBICODE_AMBSYMAS       5 // obsolete
  3665. #define DBICODE_ASETOPER       6
  3666. #define DBICODE_AVENUMDA       7
  3667. #define DBICODE_BADEXPR1       8
  3668. #define DBICODE_BADFLDOR       9
  3669. #define DBICODE_BADVNAME      10                              // 0x0a
  3670. #define DBICODE_BITMAPER      11                              // 0x0b
  3671. #define DBICODE_CALCBADR      12                              // 0x0c
  3672. #define DBICODE_CALCTYPE      13                              // 0x0d
  3673. #define DBICODE_CHGTO1TI      14                              // 0x0e
  3674. #define DBICODE_CHGTOCHG      15                              // 0x0f
  3675. #define DBICODE_CHGTOEXP      16                              // 0x10
  3676. #define DBICODE_CHGTOINS      17                              // 0x11
  3677. #define DBICODE_CHGTONEW      18                              // 0x12
  3678. #define DBICODE_CHGTOVAL      19                              // 0x13
  3679. #define DBICODE_CHKMRKFI      20                              // 0x14
  3680. #define DBICODE_CHNAMBIG      21                              // 0x15
  3681. #define DBICODE_CHUNKERR      22                              // 0x16
  3682. #define DBICODE_COLUM255      23                              // 0x17
  3683. #define DBICODE_CONAFTAS      24                              // 0x18
  3684. #define DBICODE_DEL1TIME      25                              // 0x19
  3685. #define DBICODE_DELAMBIG      26                              // 0x1a
  3686. #define DBICODE_DELFRDEL      27                              // 0x1b
  3687. #define DBICODE_EGFLDTYP      28                              // 0x1c
  3688. #define DBICODE_EXAMINOR      29                              // 0x1d
  3689. #define DBICODE_EXPRTYPS      30                              // 0x1e
  3690. #define DBICODE_EXTRACOM      31                              // 0x1f
  3691. #define DBICODE_EXTRAORO      32                              // 0x20
  3692. #define DBICODE_EXTRAQRO      33                              // 0x21
  3693. #define DBICODE_FIND1ATT      34                              // 0x22
  3694. #define DBICODE_FINDANST      35                              // 0x23
  3695. #define DBICODE_GRPNOSET      36                              // 0x24
  3696. #define DBICODE_GRPSTROW      37                              // 0x25
  3697. #define DBICODE_IDFINLCO      38                              // 0x26
  3698. #define DBICODE_IDFPERLI      39                              // 0x27
  3699. #define DBICODE_INANEXPR      40                              // 0x28
  3700. #define DBICODE_INS1TIME      41                              // 0x29
  3701. #define DBICODE_INSAMBIG      42                              // 0x2a
  3702. #define DBICODE_INSDELCH      43                              // 0x2b
  3703. #define DBICODE_INSEXPRR      44                              // 0x2c
  3704. #define DBICODE_INSTOINS      45                              // 0x2d
  3705. #define DBICODE_ISARRAY       46                              // 0x2e
  3706. #define DBICODE_LABELERR      47                              // 0x2f
  3707. #define DBICODE_LINKCALC      48                              // 0x30
  3708. #define DBICODE_LNGVNAME      49                              // 0x31
  3709. #define DBICODE_LONGQURY      50                              // 0x32
  3710. #define DBICODE_MEMVPROC      51                              // 0x33
  3711. #define DBICODE_MISNGCOM      52                              // 0x34
  3712. #define DBICODE_MISNGRPA      53                              // 0x35
  3713. #define DBICODE_MISSRTQU      54                              // 0x36
  3714. #define DBICODE_NAMTWICE      55                              // 0x37
  3715. #define DBICODE_NOCHKMAR      56                              // 0x38
  3716. #define DBICODE_NODEFOCC      57                              // 0x39
  3717. #define DBICODE_NOGROUPS      58                              // 0x3a
  3718. #define DBICODE_NONSENSE      59                              // 0x3b
  3719. #define DBICODE_NOPATTER      60                              // 0x3c
  3720. #define DBICODE_NOSUCHDA      61                              // 0x3d
  3721. #define DBICODE_NOVALUE       62                              // 0x3e
  3722. #define DBICODE_ONLYCONS      63                              // 0x3f
  3723. #define DBICODE_ONLYSETR      64                              // 0x40
  3724. #define DBICODE_OUTSENS1      65                              // 0x41
  3725. #define DBICODE_OUTTWIC1      66                              // 0x42
  3726. #define DBICODE_PAROWCNT      67                              // 0x43
  3727. #define DBICODE_PERSEPAR      68                              // 0x44
  3728. #define DBICODE_PROCPLSW      69                              // 0x45
  3729. #define DBICODE_PWINSRTS      70                              // 0x46
  3730. #define DBICODE_PWMODRTS      71                              // 0x47
  3731. #define DBICODE_QBEFLDFOUND   72                              // 0x48
  3732. #define DBICODE_QBENOFENCE    73                              // 0x49
  3733. #define DBICODE_QBENOFENCET   74                              // 0x4a
  3734. #define DBICODE_QBENOHEADERT  75                              // 0x4b
  3735. #define DBICODE_QBENOTAB      76                              // 0x4c
  3736. #define DBICODE_QBENUMCOLS    77                              // 0x4d
  3737. #define DBICODE_QBEOPENTAB    78                              // 0x4e
  3738. #define DBICODE_QBETWICE      79                              // 0x4f
  3739. #define DBICODE_QRYNOANSWER   80                              // 0x50
  3740. #define DBICODE_QRYNOTPREP    81                              // 0x51
  3741. #define DBICODE_QUAINDEL      82                              // 0x52
  3742. #define DBICODE_QUAININS      83                              // 0x53
  3743. #define DBICODE_RAGININS      84                              // 0x54
  3744. #define DBICODE_RAGINSET      85                              // 0x55
  3745. #define DBICODE_ROWUSERR      86                              // 0x56
  3746. #define DBICODE_SETEXPEC      87                              // 0x57
  3747. #define DBICODE_SETVAMB1      88                              // 0x58
  3748. #define DBICODE_SETVBAD1      89                              // 0x59
  3749. #define DBICODE_SETVDEF1      90                              // 0x5a
  3750. #define DBICODE_SUMNUMBE      91                              // 0x5b
  3751. #define DBICODE_TBLISWP3      92                              // 0x5c
  3752. #define DBICODE_TOKENNOT      93                              // 0x5d
  3753. #define DBICODE_TWOOUTR1      94                              // 0x5e
  3754. #define DBICODE_TYPEMISM      95                              // 0x5f
  3755. #define DBICODE_UNRELQ1       96                              // 0x60
  3756. #define DBICODE_UNUSEDST      97                              // 0x61
  3757. #define DBICODE_USEINSDE      98                              // 0x62
  3758. #define DBICODE_USEOFCHG      99                              // 0x63
  3759. #define DBICODE_VARMUSTF     100                              // 0x64
  3760. #define DBICODE_REGISTER     101                              // 0x65
  3761. #define DBICODE_LONGEXPR     102                              // 0x66
  3762. #define DBICODE_REFRESH      103                              // 0x67
  3763. #define DBICODE_CANCEXCEPT   104                              // 0x68
  3764. #define DBICODE_DBEXCEPT     105                              // 0x69
  3765. #define DBICODE_MEMEXCEPT    106                              // 0x6a
  3766. #define DBICODE_FATALEXCEPT  107                              // 0x6b
  3767. #define DBICODE_QRYNIY       108                              // 0x6c
  3768. #define DBICODE_BADFORMAT    109                              // 0x6d
  3769. #define DBICODE_QRYEMPTY     110                              // 0x6e
  3770. #define DBICODE_NOQRYTOPREP  111                              // 0x6f
  3771. #define DBICODE_BUFFTOOSMALL 112                              // 0x70
  3772. #define DBICODE_QRYNOTPARSE  113                              // 0x71
  3773. #define DBICODE_NOTHANDLE    114                              // 0x72
  3774. #define DBICODE_QRYSYNTERR   115                              // 0x73
  3775. #define DBICODE_QXFLDCOUNT   116                              // 0x74
  3776. #define DBICODE_QXFLDSYMNOTFOUND 117                          // 0x75
  3777. #define DBICODE_QXTBLSYMNOTFOUND 118                          // 0x76
  3778. #define DBICODE_BLOBTERM     119                              // 0x77
  3779. #define DBICODE_BLOBERR      120                              // 0x78
  3780. #define DBICODE_RESTARTQRY   121                              // 0x79
  3781. #define DBICODE_UNKNOWNANSTYPE 122                            // 0x7a
  3782.  
  3783. // Internal QBE use Only.
  3784.    #define DBICODE_SQLG_MDIST 123                           // 0x7b
  3785.    #define DBICODE_SQLG_NOARI 124                           // 0x7c
  3786.    #define DBICODE_SQLG_LIKEN 125                           // 0x7d
  3787.    #define DBICODE_SQLG_ALPHO 126                           // 0x7e
  3788.    #define DBICODE_SQLG_DATEO 127                           // 0x7f
  3789.    #define DBICODE_SQLG_RELOP 128                           // 0x80
  3790.    #define DBICODE_SQLG_ONLYC 129                           // 0x81
  3791.    #define DBICODE_SQLG_CNTLN 130                           // 0x82
  3792.    #define DBICODE_SQLG_CHINI 131                           // 0x83
  3793.    #define DBICODE_SQLG_UNION 132                           // 0x84
  3794.    #define DBICODE_SQLG_SLFIN 133                           // 0x85
  3795.    #define DBICODE_SQLG_OTJVR 134                           // 0x86
  3796.    #define DBICODE_SQLG_STROW 135                           // 0x87
  3797.    #define DBICODE_SQLG_QUANT 136                           // 0x88
  3798.    #define DBICODE_SQLG_REGSO 137                           // 0x89
  3799.    #define DBICODE_SQLG_COUNT 138                           // 0x8a
  3800.    #define DBICODE_SQLG_AVERA 139                           // 0x8b
  3801.    #define DBICODE_SQLG_DATEA 140                           // 0x8c
  3802.    #define DBICODE_SQLG_BADPT 141                           // 0x8d
  3803.    #define DBICODE_SQLG_RELPA 142                           // 0x8e
  3804.    #define DBICODE_SQLG_PATRN 143                           // 0x8f
  3805.    #define DBICODE_SQLG_FNDSU 144                           // 0x90
  3806.    #define DBICODE_SQLG_IFDCS 145                           // 0x91
  3807.    #define DBICODE_SQLG_IDCCO 146                           // 0x92
  3808.    #define DBICODE_SQLG_ONLYI 147                           // 0x93
  3809.    #define DBICODE_SQLG_SQLDIALECT 148                      // 0x94
  3810.    #define DBICODE_SQLG_NOQUERY 149                         // 0x95
  3811. // End of Internal.
  3812.  
  3813. #define DBICODE_BLOBGROUP 150                               // 0x96
  3814. #define DBICODE_QRYNOPROP  151                              // 0x97
  3815. #define DBICODE_ANSTYPNOTSUP  152                           // 0x98
  3816. #define DBICODE_ANSALIASNOTSUP  153                         // 0x99
  3817. #define DBICODE_INSBLOBREQ      154                         // 0x9a
  3818. #define DBICODE_CHGUNIQUENDXREQ 155                         // 0x9b
  3819. #define DBICODE_DELUNIQUENDXREQ 156                         // 0x9c
  3820. #define DBICODE_SQLNOFULLUPDATE 157                         // 0x9d
  3821. #define DBICODE_CANTEXECREMOTE  158                         // 0x9e
  3822. #define DBICODE_UNEXPECTEDEOC   159                         // 0x9f
  3823. #define DBICODE_SQLPARAMNOTSET  160                         // 0xA0
  3824. #define DBICODE_QUERYTOOLONG    161                         // 0xA1
  3825.  
  3826.  
  3827. // Errors added for localsql
  3828. #define  DBICODE_NOSUCHRELORALIAS    170
  3829. #define  DBICODE_TYPEAMBIGUITY       171
  3830. #define  DBICODE_ORDERBYNOTAPROJ     172
  3831. #define  DBICODE_SQLPARSE            173
  3832. #define  DBICODE_CONSTRAINTFAILED    174
  3833. #define  DBICODE_NOTGROUPINGFIELD    175
  3834. #define  DBICODE_UDFNOTDEFINED       176
  3835. #define  DBICODE_UDFERROR            177
  3836. #define  DBICODE_SINGLEROWERROR      178
  3837. #define  DBICODE_GROUPEXPR           179
  3838. #define  DBICODE_QUERYTEXT           180
  3839. #define  DBICODE_ANSIJOINSUP         181
  3840. #define  DBICODE_DISTUNION           182
  3841. #define  DBICODE_GROUPBYREQ          183
  3842. #define  DBICODE_INSUPDAUTOIC        184
  3843. #define  DBICODE_UPDREFINTSINGLE     185
  3844.  
  3845.  
  3846.  
  3847. #define DBIERR_AMBJOASY    (ERRBASE_QUERY+DBICODE_AMBJOASY)
  3848. #define DBIERR_AMBJOSYM    (ERRBASE_QUERY+DBICODE_AMBJOSYM)
  3849. #define DBIERR_AMBOUTEX    (ERRBASE_QUERY+DBICODE_AMBOUTEX)
  3850. #define DBIERR_AMBOUTPR    (ERRBASE_QUERY+DBICODE_AMBOUTPR)
  3851. #define DBIERR_AMBSYMAS    (ERRBASE_QUERY+DBICODE_AMBSYMAS)
  3852. #define DBIERR_ASETOPER    (ERRBASE_QUERY+DBICODE_ASETOPER)
  3853. #define DBIERR_AVENUMDA    (ERRBASE_QUERY+DBICODE_AVENUMDA)
  3854. #define DBIERR_BADEXPR1    (ERRBASE_QUERY+DBICODE_BADEXPR1)
  3855. #define DBIERR_BADFLDOR    (ERRBASE_QUERY+DBICODE_BADFLDOR)
  3856. #define DBIERR_BADVNAME    (ERRBASE_QUERY+DBICODE_BADVNAME)
  3857. #define DBIERR_BITMAPER    (ERRBASE_QUERY+DBICODE_BITMAPER)
  3858. #define DBIERR_CALCBADR    (ERRBASE_QUERY+DBICODE_CALCBADR)
  3859. #define DBIERR_CALCTYPE    (ERRBASE_QUERY+DBICODE_CALCTYPE)
  3860. #define DBIERR_CHGTO1TI    (ERRBASE_QUERY+DBICODE_CHGTO1TI)
  3861. #define DBIERR_CHGTOCHG    (ERRBASE_QUERY+DBICODE_CHGTOCHG)
  3862. #define DBIERR_CHGTOEXP    (ERRBASE_QUERY+DBICODE_CHGTOEXP)
  3863. #define DBIERR_CHGTOINS    (ERRBASE_QUERY+DBICODE_CHGTOINS)
  3864. #define DBIERR_CHGTONEW    (ERRBASE_QUERY+DBICODE_CHGTONEW)
  3865. #define DBIERR_CHGTOVAL    (ERRBASE_QUERY+DBICODE_CHGTOVAL)
  3866. #define DBIERR_CHKMRKFI    (ERRBASE_QUERY+DBICODE_CHKMRKFI)
  3867. #define DBIERR_CHNAMBIG    (ERRBASE_QUERY+DBICODE_CHNAMBIG)
  3868. #define DBIERR_CHUNKERR    (ERRBASE_QUERY+DBICODE_CHUNKERR)
  3869. #define DBIERR_COLUM255    (ERRBASE_QUERY+DBICODE_COLUM255)
  3870. #define DBIERR_CONAFTAS    (ERRBASE_QUERY+DBICODE_CONAFTAS)
  3871. #define DBIERR_DEL1TIME    (ERRBASE_QUERY+DBICODE_DEL1TIME)
  3872. #define DBIERR_DELAMBIG    (ERRBASE_QUERY+DBICODE_DELAMBIG)
  3873. #define DBIERR_DELFRDEL    (ERRBASE_QUERY+DBICODE_DELFRDEL)
  3874. #define DBIERR_EGFLDTYP    (ERRBASE_QUERY+DBICODE_EGFLDTYP)
  3875. #define DBIERR_EXAMINOR    (ERRBASE_QUERY+DBICODE_EXAMINOR)
  3876. #define DBIERR_EXPRTYPS    (ERRBASE_QUERY+DBICODE_EXPRTYPS)
  3877. #define DBIERR_EXTRACOM    (ERRBASE_QUERY+DBICODE_EXTRACOM)
  3878. #define DBIERR_EXTRAORO    (ERRBASE_QUERY+DBICODE_EXTRAORO)
  3879. #define DBIERR_EXTRAQRO    (ERRBASE_QUERY+DBICODE_EXTRAQRO)
  3880. #define DBIERR_FIND1ATT    (ERRBASE_QUERY+DBICODE_FIND1ATT)
  3881. #define DBIERR_FINDANST    (ERRBASE_QUERY+DBICODE_FINDANST)
  3882. #define DBIERR_GRPNOSET    (ERRBASE_QUERY+DBICODE_GRPNOSET)
  3883. #define DBIERR_GRPSTROW    (ERRBASE_QUERY+DBICODE_GRPSTROW)
  3884. #define DBIERR_IDFINLCO    (ERRBASE_QUERY+DBICODE_IDFINLCO)
  3885. #define DBIERR_IDFPERLI    (ERRBASE_QUERY+DBICODE_IDFPERLI)
  3886. #define DBIERR_INANEXPR    (ERRBASE_QUERY+DBICODE_INANEXPR)
  3887. #define DBIERR_INS1TIME    (ERRBASE_QUERY+DBICODE_INS1TIME)
  3888. #define DBIERR_INSAMBIG    (ERRBASE_QUERY+DBICODE_INSAMBIG)
  3889. #define DBIERR_INSDELCH    (ERRBASE_QUERY+DBICODE_INSDELCH)
  3890. #define DBIERR_INSEXPRR    (ERRBASE_QUERY+DBICODE_INSEXPRR)
  3891. #define DBIERR_INSTOINS    (ERRBASE_QUERY+DBICODE_INSTOINS)
  3892. #define DBIERR_ISARRAY     (ERRBASE_QUERY+DBICODE_ISARRAY)
  3893. #define DBIERR_LABELERR    (ERRBASE_QUERY+DBICODE_LABELERR)
  3894. #define DBIERR_LINKCALC    (ERRBASE_QUERY+DBICODE_LINKCALC)
  3895. #define DBIERR_LNGVNAME    (ERRBASE_QUERY+DBICODE_LNGVNAME)
  3896. #define DBIERR_LONGQURY    (ERRBASE_QUERY+DBICODE_LONGQURY)
  3897. #define DBIERR_MEMVPROC    (ERRBASE_QUERY+DBICODE_MEMVPROC)
  3898. #define DBIERR_MISNGCOM    (ERRBASE_QUERY+DBICODE_MISNGCOM)
  3899. #define DBIERR_MISNGRPA    (ERRBASE_QUERY+DBICODE_MISNGRPA)
  3900. #define DBIERR_MISSRTQU    (ERRBASE_QUERY+DBICODE_MISSRTQU)
  3901. #define DBIERR_NAMTWICE    (ERRBASE_QUERY+DBICODE_NAMTWICE)
  3902. #define DBIERR_NOCHKMAR    (ERRBASE_QUERY+DBICODE_NOCHKMAR)
  3903. #define DBIERR_NODEFOCC    (ERRBASE_QUERY+DBICODE_NODEFOCC)
  3904. #define DBIERR_NOGROUPS    (ERRBASE_QUERY+DBICODE_NOGROUPS)
  3905. #define DBIERR_NONSENSE    (ERRBASE_QUERY+DBICODE_NONSENSE)
  3906. #define DBIERR_NOPATTER    (ERRBASE_QUERY+DBICODE_NOPATTER)
  3907. #define DBIERR_NOSUCHDA    (ERRBASE_QUERY+DBICODE_NOSUCHDA)
  3908. #define DBIERR_NOVALUE     (ERRBASE_QUERY+DBICODE_NOVALUE)
  3909. #define DBIERR_ONLYCONS    (ERRBASE_QUERY+DBICODE_ONLYCONS)
  3910. #define DBIERR_ONLYSETR    (ERRBASE_QUERY+DBICODE_ONLYSETR)
  3911. #define DBIERR_OUTSENS1    (ERRBASE_QUERY+DBICODE_OUTSENS1)
  3912. #define DBIERR_OUTTWIC1    (ERRBASE_QUERY+DBICODE_OUTTWIC1)
  3913. #define DBIERR_PAROWCNT    (ERRBASE_QUERY+DBICODE_PAROWCNT)
  3914. #define DBIERR_PERSEPAR    (ERRBASE_QUERY+DBICODE_PERSEPAR)
  3915. #define DBIERR_PROCPLSW    (ERRBASE_QUERY+DBICODE_PROCPLSW)
  3916. #define DBIERR_PWINSRTS    (ERRBASE_QUERY+DBICODE_PWINSRTS)
  3917. #define DBIERR_PWMODRTS    (ERRBASE_QUERY+DBICODE_PWMODRTS)
  3918. #define DBIERR_QBEFLDFOUND (ERRBASE_QUERY+DBICODE_QBEFLDFOUND)
  3919. #define DBIERR_QBENOFENCE  (ERRBASE_QUERY+DBICODE_QBENOFENCE)
  3920. #define DBIERR_QBENOFENCET (ERRBASE_QUERY+DBICODE_QBENOFENCET)
  3921. #define DBIERR_QBENOHEADERT (ERRBASE_QUERY+DBICODE_QBENOHEADERT)
  3922. #define DBIERR_QBENOTAB    (ERRBASE_QUERY+DBICODE_QBENOTAB)
  3923. #define DBIERR_QBENUMCOLS  (ERRBASE_QUERY+DBICODE_QBENUMCOLS)
  3924. #define DBIERR_QBEOPENTAB  (ERRBASE_QUERY+DBICODE_QBEOPENTAB)
  3925. #define DBIERR_QBETWICE    (ERRBASE_QUERY+DBICODE_QBETWICE)
  3926. #define DBIERR_QRYNOANSWER (ERRBASE_QUERY+DBICODE_QRYNOANSWER)
  3927. #define DBIERR_QRYNOTPREP  (ERRBASE_QUERY+DBICODE_QRYNOTPREP)
  3928. #define DBIERR_QUAINDEL    (ERRBASE_QUERY+DBICODE_QUAINDEL)
  3929. #define DBIERR_QUAININS    (ERRBASE_QUERY+DBICODE_QUAININS)
  3930. #define DBIERR_RAGININS    (ERRBASE_QUERY+DBICODE_RAGININS)
  3931. #define DBIERR_RAGINSET    (ERRBASE_QUERY+DBICODE_RAGINSET)
  3932. #define DBIERR_ROWUSERR    (ERRBASE_QUERY+DBICODE_ROWUSERR)
  3933. #define DBIERR_SETEXPEC    (ERRBASE_QUERY+DBICODE_SETEXPEC)
  3934. #define DBIERR_SETVAMB1    (ERRBASE_QUERY+DBICODE_SETVAMB1)
  3935. #define DBIERR_SETVBAD1    (ERRBASE_QUERY+DBICODE_SETVBAD1)
  3936. #define DBIERR_SETVDEF1    (ERRBASE_QUERY+DBICODE_SETVDEF1)
  3937. #define DBIERR_SUMNUMBE    (ERRBASE_QUERY+DBICODE_SUMNUMBE)
  3938. #define DBIERR_TBLISWP3    (ERRBASE_QUERY+DBICODE_TBLISWP3)
  3939. #define DBIERR_TOKENNOT    (ERRBASE_QUERY+DBICODE_TOKENNOT)
  3940. #define DBIERR_TWOOUTR1    (ERRBASE_QUERY+DBICODE_TWOOUTR1)
  3941. #define DBIERR_TYPEMISM    (ERRBASE_QUERY+DBICODE_TYPEMISM)
  3942. #define DBIERR_UNRELQ1     (ERRBASE_QUERY+DBICODE_UNRELQ1)
  3943. #define DBIERR_UNUSEDST    (ERRBASE_QUERY+DBICODE_UNUSEDST)
  3944. #define DBIERR_USEINSDE    (ERRBASE_QUERY+DBICODE_USEINSDE)
  3945. #define DBIERR_USEOFCHG    (ERRBASE_QUERY+DBICODE_USEOFCHG)
  3946. #define DBIERR_VARMUSTF    (ERRBASE_QUERY+DBICODE_VARMUSTF)
  3947. #define DBIERR_REGISTER    (ERRBASE_QUERY+DBICODE_REGISTER)
  3948. #define DBIERR_LONGEXPR    (ERRBASE_QUERY+DBICODE_LONGEXPR)
  3949. #define DBIERR_REFRESH     (ERRBASE_QUERY+DBICODE_REFRESH)
  3950. #define DBIERR_CANCEXCEPT  (ERRBASE_QUERY+DBICODE_CANCEXCEPT)
  3951. #define DBIERR_DBEXCEPT    (ERRBASE_QUERY+DBICODE_DBEXCEPT)
  3952. #define DBIERR_MEMEXCEPT   (ERRBASE_QUERY+DBICODE_MEMEXCEPT)
  3953. #define DBIERR_FATALEXCEPT (ERRBASE_QUERY+DBICODE_FATALEXCEPT)
  3954. #define DBIERR_QRYNIY      (ERRBASE_QUERY+ DBICODE_QRYNIY)
  3955. #define DBIERR_BADFORMAT   (ERRBASE_QUERY+ DBICODE_BADFORMAT)
  3956. #define DBIERR_QRYEMPTY    (ERRBASE_QUERY+ DBICODE_QRYEMPTY)
  3957. #define DBIERR_NOQRYTOPREP (ERRBASE_QUERY+ DBICODE_NOQRYTOPREP)
  3958. #define DBIERR_BUFFTOOSMALL (ERRBASE_QUERY+ DBICODE_BUFFTOOSMALL)
  3959. #define DBIERR_QRYNOTPARSE (ERRBASE_QUERY+ DBICODE_QRYNOTPARSE)
  3960. #define DBIERR_NOTHANDLE   (ERRBASE_QUERY+ DBICODE_NOTHANDLE)
  3961. #define DBIERR_QRYSYNTERR  (ERRBASE_QUERY+ DBICODE_QRYSYNTERR)
  3962. #define DBIERR_QXFLDCOUNT  (ERRBASE_QUERY+ DBICODE_QXFLDCOUNT)
  3963. #define DBIERR_QXFLDSYMNOTFOUND (ERRBASE_QUERY+ DBICODE_QXFLDSYMNOTFOUND)
  3964. #define DBIERR_QXTBLSYMNOTFOUND (ERRBASE_QUERY+ DBICODE_QXTBLSYMNOTFOUND)
  3965. #define DBIERR_BLOBTERM    (ERRBASE_QUERY+ DBICODE_BLOBTERM)
  3966. #define DBIERR_BLOBERR     (ERRBASE_QUERY+ DBICODE_BLOBERR)
  3967. #define DBIERR_RESTARTQRY  (ERRBASE_QUERY+ DBICODE_RESTARTQRY)
  3968. #define DBIERR_UNKNOWNANSTYPE (ERRBASE_QUERY+ DBICODE_UNKNOWNANSTYPE)
  3969. #define DBIERR_SQLG_MDIST  (ERRBASE_QUERY+ DBICODE_SQLG_MDIST)
  3970. #define DBIERR_SQLG_NOARI  (ERRBASE_QUERY+ DBICODE_SQLG_NOARI)
  3971. #define DBIERR_SQLG_LIKEN  (ERRBASE_QUERY+ DBICODE_SQLG_LIKEN)
  3972. #define DBIERR_SQLG_ALPHO  (ERRBASE_QUERY+ DBICODE_SQLG_ALPHO)
  3973. #define DBIERR_SQLG_DATEO  (ERRBASE_QUERY+ DBICODE_SQLG_DATEO)
  3974. #define DBIERR_SQLG_RELOP  (ERRBASE_QUERY+ DBICODE_SQLG_RELOP)
  3975. #define DBIERR_SQLG_ONLYC  (ERRBASE_QUERY+ DBICODE_SQLG_ONLYC)
  3976. #define DBIERR_SQLG_CNTLN  (ERRBASE_QUERY+ DBICODE_SQLG_CNTLN)
  3977. #define DBIERR_SQLG_CHINI  (ERRBASE_QUERY+ DBICODE_SQLG_CHINI)
  3978. #define DBIERR_SQLG_UNION  (ERRBASE_QUERY+ DBICODE_SQLG_UNION)
  3979. #define DBIERR_SQLG_SLFIN  (ERRBASE_QUERY+ DBICODE_SQLG_SLFIN)
  3980. #define DBIERR_SQLG_OTJVR  (ERRBASE_QUERY+ DBICODE_SQLG_OTJVR)
  3981. #define DBIERR_SQLG_STROW  (ERRBASE_QUERY+ DBICODE_SQLG_STROW)
  3982. #define DBIERR_SQLG_QUANT  (ERRBASE_QUERY+ DBICODE_SQLG_QUANT)
  3983. #define DBIERR_SQLG_REGSO  (ERRBASE_QUERY+ DBICODE_SQLG_REGSO)
  3984. #define DBIERR_SQLG_COUNT  (ERRBASE_QUERY+ DBICODE_SQLG_COUNT)
  3985. #define DBIERR_SQLG_AVERA  (ERRBASE_QUERY+ DBICODE_SQLG_AVERA)
  3986. #define DBIERR_SQLG_DATEA  (ERRBASE_QUERY+ DBICODE_SQLG_DATEA)
  3987. #define DBIERR_SQLG_BADPT  (ERRBASE_QUERY+ DBICODE_SQLG_BADPT)
  3988. #define DBIERR_SQLG_RELPA  (ERRBASE_QUERY+ DBICODE_SQLG_RELPA)
  3989. #define DBIERR_SQLG_PATRN  (ERRBASE_QUERY+ DBICODE_SQLG_PATRN)
  3990. #define DBIERR_SQLG_FNDSU  (ERRBASE_QUERY+ DBICODE_SQLG_FNDSU)
  3991. #define DBIERR_SQLG_IFDCS  (ERRBASE_QUERY+ DBICODE_SQLG_IFDCS)
  3992. #define DBIERR_SQLG_IDCCO  (ERRBASE_QUERY+ DBICODE_SQLG_IDCCO)
  3993. #define DBIERR_SQLG_ONLYI  (ERRBASE_QUERY+ DBICODE_SQLG_ONLYI)
  3994. #define DBIERR_SQLG_SQLDIALECT (ERRBASE_QUERY+ DBICODE_SQLG_SQLDIALECT)
  3995. #define DBIERR_SQLG_NOQUERY (ERRBASE_QUERY+ DBICODE_SQLG_NOQUERY)
  3996. #define DBIERR_BLOBGROUP   (ERRBASE_QUERY+ DBICODE_BLOBGROUP)
  3997. #define DBIERR_QRYNOPROP   (ERRBASE_QUERY+DBICODE_QRYNOPROP)
  3998. #define DBIERR_ANSTYPNOTSUP   (ERRBASE_QUERY+DBICODE_ANSTYPNOTSUP)
  3999. #define DBIERR_ANSALIASNOTSUP (ERRBASE_QUERY+DBICODE_ANSALIASNOTSUP)
  4000. #define DBIERR_INSBLOBREQ     (ERRBASE_QUERY+DBICODE_INSBLOBREQ     )                         // 0x9a
  4001. #define DBIERR_CHGUNIQUENDXREQ (ERRBASE_QUERY+DBICODE_CHGUNIQUENDXREQ)                         // 0x9b
  4002. #define DBIERR_DELUNIQUENDXREQ (ERRBASE_QUERY+DBICODE_DELUNIQUENDXREQ)                         // 0x9c
  4003. #define DBIERR_SQLNOFULLUPDATE (ERRBASE_QUERY+DBICODE_SQLNOFULLUPDATE)                         // 0x9d
  4004. #define DBIERR_CANTEXECREMOTE  (ERRBASE_QUERY+DBICODE_CANTEXECREMOTE)                          // 0x9e
  4005. #define DBIERR_UNEXPECTEDEOC   (ERRBASE_QUERY+DBICODE_UNEXPECTEDEOC)
  4006. #define DBIERR_SQLPARAMNOTSET  (ERRBASE_QUERY+DBICODE_SQLPARAMNOTSET)
  4007. #define DBIERR_QUERYTOOLONG    (ERRBASE_QUERY+DBICODE_QUERYTOOLONG)
  4008.  
  4009. #define   DBIERR_NOSUCHRELORALIAS    (ERRBASE_QUERY+DBICODE_NOSUCHRELORALIAS)
  4010. #define  DBIERR_TYPEAMBIGUITY       (ERRBASE_QUERY+DBICODE_TYPEAMBIGUITY)
  4011. #define  DBIERR_ORDERBYNOTAPROJ    (ERRBASE_QUERY+DBICODE_ORDERBYNOTAPROJ)
  4012. #define  DBIERR_SQLPARSE          (ERRBASE_QUERY+DBICODE_SQLPARSE)
  4013. #define  DBIERR_CONSTRAINTFAILED (ERRBASE_QUERY+DBICODE_CONSTRAINTFAILED)
  4014. #define  DBIERR_NOTGROUPINGFIELD (ERRBASE_QUERY+DBICODE_NOTGROUPINGFIELD)
  4015. #define  DBIERR_UDFNOTDEFINED   (ERRBASE_QUERY+DBICODE_UDFNOTDEFINED)
  4016. #define  DBIERR_UDFERROR      (ERRBASE_QUERY+DBICODE_UDFERROR)
  4017. #define  DBIERR_SINGLEROWERROR      (ERRBASE_QUERY+DBICODE_SINGLEROWERROR)
  4018. #define  DBIERR_GROUPEXPR      (ERRBASE_QUERY+DBICODE_GROUPEXPR)
  4019. #define  DBIERR_QUERYTEXT     (ERRBASE_QUERY+DBICODE_QUERYTEXT)
  4020. #define  DBIERR_ANSIJOINSUP   ( ERRBASE_QUERY + DBICODE_ANSIJOINSUP)
  4021. #define  DBIERR_DISTUNION      ( ERRBASE_QUERY + DBICODE_DISTUNION  )
  4022. #define  DBIERR_GROUPBYREQ      ( ERRBASE_QUERY + DBICODE_GROUPBYREQ )
  4023. #define  DBIERR_INSUPDAUTOINC   ( ERRBASE_QUERY + DBICODE_INSUPDAUTOIC)
  4024. #define  DBIERR_UPDREFINTSINGLE   ( ERRBASE_QUERY + DBICODE_UPDREFINTSINGLE)
  4025.  
  4026.  
  4027. // END_OF_QUERY_MESSAGES
  4028.  
  4029. // ERRCAT_VERSION
  4030. // ===============
  4031.  
  4032. #define  ERRCODE_INTERFACEVER    1        // Interface mismatch
  4033. #define  ERRCODE_INDEXOUTOFDATE  2        // Index is out of date
  4034. #define  ERRCODE_OLDVERSION      3        // Older version (see context)
  4035. #define  ERRCODE_VALFILEINVALID  4        // Val. file is out of date
  4036. #define  ERRCODE_BLOBVERSION     5        // Old Blob file version
  4037. #define  ERRCODE_ENGQRYMISMATCH  6        // Query and IDAPI are mismatched
  4038. #define  ERRCODE_SERVERVERSION   7        // Server is incompatible version
  4039. #define  ERRCODE_TABLELEVEL      8        // Higher table level required
  4040.  
  4041. #define  DBIERR_INTERFACEVER     (ERRBASE_VERSION + ERRCODE_INTERFACEVER)
  4042. #define  DBIERR_INDEXOUTOFDATE   (ERRBASE_VERSION + ERRCODE_INDEXOUTOFDATE)
  4043. #define  DBIERR_OLDVERSION       (ERRBASE_VERSION + ERRCODE_OLDVERSION)
  4044. #define  DBIERR_VALFILEINVALID   (ERRBASE_VERSION + ERRCODE_VALFILEINVALID)
  4045. #define  DBIERR_BLOBVERSION      (ERRBASE_VERSION + ERRCODE_BLOBVERSION)
  4046. #define  DBIERR_ENGQRYMISMATCH   (ERRBASE_VERSION + ERRCODE_ENGQRYMISMATCH)
  4047. #define  DBIERR_SERVERVERSION    (ERRBASE_VERSION + ERRCODE_SERVERVERSION)
  4048. #define  DBIERR_TABLELEVEL       (ERRBASE_VERSION + ERRCODE_TABLELEVEL)
  4049.  
  4050. // ERRCAT_CAPABILITY
  4051. // =================
  4052.  
  4053. #define  ERRCODE_NOTSUPPORTED    1        // Capability not supported
  4054. #define  ERRCODE_NIY             2        // Not Implemented Yet
  4055. #define  ERRCODE_TABLESQL        3        // Cannot access SQL replica
  4056. #define  ERRCODE_SEARCHCOLREQD   4        // Searchable (Non-blob column) required
  4057. #define  ERRCODE_NOMULTCONNECT   5        // Multiple connections not supported
  4058. #define  ERRCODE_NODBASEEXPR     6        // Full dBASE Expressions not supported
  4059.  
  4060. #define  DBIERR_NOTSUPPORTED     (ERRBASE_CAPABILITY + ERRCODE_NOTSUPPORTED)
  4061. #define  DBIERR_NIY              (ERRBASE_CAPABILITY + ERRCODE_NIY)
  4062. #define  DBIERR_TABLESQL         (ERRBASE_CAPABILITY + ERRCODE_TABLESQL)
  4063. #define  DBIERR_SEARCHCOLREQD    (ERRBASE_CAPABILITY + ERRCODE_SEARCHCOLREQD)
  4064. #define  DBIERR_NOMULTCONNECT    (ERRBASE_CAPABILITY + ERRCODE_NOMULTCONNECT)
  4065. #define  DBIERR_NODBASEEXPR      (ERRBASE_CAPABILITY + ERRCODE_NODBASEEXPR)
  4066.  
  4067. // ERRCAT_CONFIG
  4068. // =============
  4069.  
  4070. #define ERRCODE_INVALIDDBSPEC    1
  4071. #define ERRCODE_UNKNOWNDBTYPE    2
  4072. #define ERRCODE_INVALIDSYSDATA   3
  4073. #define ERRCODE_UNKNOWNNETTYPE   4
  4074. #define ERRCODE_NOTONTHATNET     5
  4075. #define ERRCODE_INVALIDCFGPARAM  6        // Generic invalid config param
  4076.  
  4077.  
  4078. #define DBIERR_INVALIDDBSPEC     (ERRBASE_CONFIG + ERRCODE_INVALIDDBSPEC)
  4079. #define DBIERR_UNKNOWNDBTYPE     (ERRBASE_CONFIG + ERRCODE_UNKNOWNDBTYPE)
  4080. #define DBIERR_INVALIDSYSDATA    (ERRBASE_CONFIG + ERRCODE_INVALIDSYSDATA)
  4081. #define DBIERR_UNKNOWNNETTYPE    (ERRBASE_CONFIG + ERRCODE_UNKNOWNNETTYPE)
  4082. #define DBIERR_NOTONTHATNET      (ERRBASE_CONFIG + ERRCODE_NOTONTHATNET)
  4083. #define DBIERR_INVALIDCFGPARAM   (ERRBASE_CONFIG + ERRCODE_INVALIDCFGPARAM)
  4084.  
  4085. // ERRCAT_WARNING  non-fatal warnings:
  4086. // warn user of action, or ask for optional behavior
  4087. // ==============
  4088. #define ERRCODE_OBJIMPLICITLYDROPPED      1
  4089. #define ERRCODE_OBJMAYBETRUNCATED         2
  4090. #define ERRCODE_OBJIMPLICITLYMODIFIED     3
  4091. #define ERRCODE_VALIDATEDATA              4
  4092. #define ERRCODE_VALFIELDMODIFIED          5
  4093. #define ERRCODE_TABLELEVELCHANGED         6
  4094. #define ERRCODE_COPYLINKEDTABLES          7
  4095. #define ERRCODE_OTHERSERVERLOADED         8
  4096. #define ERRCODE_OBJIMPLICITLYTRUNCATED    9
  4097. #define ERRCODE_VCHKMAYNOTBEENFORCED      10
  4098. #define ERRCODE_MULTIPLEUNIQRECS          11
  4099. #define ERRCODE_FIELDMUSTBETRIMMED        12
  4100.  
  4101. #define DBIERR_OBJIMPLICITLYDROPPED  \
  4102.    ( ERRBASE_WARNING + ERRCODE_OBJIMPLICITLYDROPPED)
  4103. #define DBIERR_OBJMAYBETRUNCATED (ERRBASE_WARNING + ERRCODE_OBJMAYBETRUNCATED)
  4104. #define DBIERR_OBJIMPLICITLYMODIFIED  \
  4105.    ( ERRBASE_WARNING + ERRCODE_OBJIMPLICITLYMODIFIED)
  4106. #define DBIERR_VALIDATEDATA              \
  4107.    ( ERRBASE_WARNING + ERRCODE_VALIDATEDATA)
  4108. #define DBIERR_VALFIELDMODIFIED          \
  4109.    ( ERRBASE_WARNING + ERRCODE_VALFIELDMODIFIED)
  4110. #define DBIERR_TABLELEVELCHANGED         \
  4111.    ( ERRBASE_WARNING + ERRCODE_TABLELEVELCHANGED)
  4112. #define DBIERR_COPYLINKEDTABLES          \
  4113.    ( ERRBASE_WARNING + ERRCODE_COPYLINKEDTABLES)
  4114. #define DBIERR_OTHERSERVERLOADED          \
  4115.    ( ERRBASE_WARNING + ERRCODE_OTHERSERVERLOADED)
  4116. #define DBIERR_OBJIMPLICITLYTRUNCATED  \
  4117.    ( ERRBASE_WARNING + ERRCODE_OBJIMPLICITLYTRUNCATED)
  4118. #define DBIERR_VCHKMAYNOTBEENFORCED       \
  4119.    ( ERRBASE_WARNING + ERRCODE_VCHKMAYNOTBEENFORCED )
  4120. #define DBIERR_MULTIPLEUNIQRECS    \
  4121.    ( ERRBASE_WARNING + ERRCODE_MULTIPLEUNIQRECS )
  4122. #define DBIERR_FIELDMUSTBETRIMMED        \
  4123.    ( ERRBASE_WARNING + ERRCODE_FIELDMUSTBETRIMMED )
  4124.  
  4125.  
  4126. // ERRCAT_OTHER
  4127. // ============
  4128.  
  4129. #define  ERRCODE_FILEEXISTS      1        // File already exsits
  4130. #define  ERRCODE_BLOBMODIFIED    2        // Another user modified Blob
  4131. #define  ERRCODE_UNKNOWNSQL      3        // Unknown SQL error
  4132. #define  ERRCODE_TABLEEXISTS     4        // Table already exsits
  4133. #define  ERRCODE_PDX10TABLE      5        // Paradox 1.0 tables not supported
  4134. #define  ERRCODE_UPDATEABORT     6        // Cached Update aborted
  4135.  
  4136. #define  DBIERR_FILEEXISTS       (ERRBASE_OTHER + ERRCODE_FILEEXISTS)
  4137. #define  DBIERR_BLOBMODIFIED     (ERRBASE_OTHER + ERRCODE_BLOBMODIFIED)
  4138. #define  DBIERR_UNKNOWNSQL       (ERRBASE_OTHER + ERRCODE_UNKNOWNSQL)
  4139. #define  DBIERR_TABLEEXISTS      (ERRBASE_OTHER + ERRCODE_TABLEEXISTS)
  4140. #define  DBIERR_PDX10TABLE       (ERRBASE_OTHER + ERRCODE_PDX10TABLE)
  4141. #define  DBIERR_UPDATEABORT      (ERRBASE_OTHER + ERRCODE_UPDATEABORT)
  4142.  
  4143. //
  4144.  
  4145. // ERRCAT_COMPATIBILITY
  4146. // =====================
  4147.  
  4148. #define  ERRCODE_DIFFSORTORDER    1        // Sortorders not compatible
  4149. #define  ERRCODE_DIRINUSEBYOLDVER 2        // Directory in use by old version
  4150. #define  ERRCODE_PDX35LDDRIVER    3        // Needs Pdox 3.5 compatible language driver
  4151.  
  4152. #define  DBIERR_DIFFSORTORDER     (ERRBASE_COMPATIBILITY + ERRCODE_DIFFSORTORDER)
  4153. #define  DBIERR_DIRINUSEBYOLDVER  (ERRBASE_COMPATIBILITY + ERRCODE_DIRINUSEBYOLDVER)
  4154. #define  DBIERR_PDX35LDDRIVER     (ERRBASE_COMPATIBILITY + ERRCODE_PDX35LDDRIVER)
  4155.  
  4156. // ERRCAT_OPTPARAM
  4157. // ===============
  4158.  
  4159. #define ERRCODE_REQOPTPARAM     1       // Required optional parameter missing
  4160. #define ERRCODE_INVALIDOPTPARAM 2       // Optional param out-of-range or bad
  4161.  
  4162.  
  4163. #define DBIERR_REQOPTPARAM      (ERRBASE_OPTPARAM + ERRCODE_REQOPTPARAM)
  4164. #define DBIERR_INVALIDOPTPARAM  (ERRBASE_OPTPARAM + ERRCODE_INVALIDOPTPARAM)
  4165.  
  4166. //  ERRCAT_REPOSITORY
  4167. //  =================
  4168.  
  4169. #define  ERRCODE_REPOSITORYCORRUPT      1    // Data Repository is corrupt
  4170. #define  ERRCODE_INFOBLOBCORRUPT        2    // Info Blob corrupted
  4171. #define  ERRCODE_SCHEMACORRUPT          3    // DR Schema is corrupt
  4172. #define  ERRCODE_ATTRTYPEEXISTS         4    // Attribute Type exists
  4173. #define  ERRCODE_INVALIDOBJTYPE         5    // Invalid Object Type
  4174. #define  ERRCODE_INVALIDRELATIONTYPE    6    // Invalid Relation Type
  4175. #define  ERRCODE_VIEWEXISTS             7    // View already exists
  4176. #define  ERRCODE_NOSUCHVIEW             8    // No such View exists
  4177. #define  ERRCODE_INVALIDRECCONSTRAINT   9    // Invalid Record Constraint
  4178. #define  ERRCODE_LDBCONNECTION          10   // Object is in a Logical DB
  4179. #define  ERRCODE_REPOSITORYEXISTS       11   // Repository already exists
  4180. #define  ERRCODE_NOSUCHREPOSITORY       12   // Repository does not exist
  4181. #define  ERRCODE_REPOSITORYDBMISSING    13   // Repository database does not exist
  4182. #define  ERRCODE_REPOSITORYOUTOFDATE    14   // Repository info is out of date
  4183. #define  ERRCODE_REPOSITORYVERSION      15   // DR Version mismatch
  4184. #define  ERRCODE_REPOSITORYNAME         16   // Invalid Repository name
  4185. #define  ERRCODE_DEPENDENTOBJECTS       17   // Dependent Objects exist
  4186. #define  ERRCODE_RELATIONLIMIT          18   // Too many Relationships for this Object Type
  4187. #define  ERRCODE_RELATIONSHIPSEXIST     19   // Relationships to the Object exist
  4188. #define  ERRCODE_EXCHANGEFILECORRUPT    20   // Exchange File Corrupt
  4189. #define  ERRCODE_EXCHANGEFILEVERSION    21   // Exchange File Version Mismatch
  4190. #define  ERRCODE_TYPEMISMATCH           22   // Exchange File and Repository Types don't match
  4191. #define  ERRCODE_OBJECTEXISTS           23   // Object Exists in the Target Repository
  4192. #define  ERRCODE_REPOSITORYACCESS       24   // Access to Repository Denied
  4193. #define  ERRCODE_REPOSITORYCREATE       25   // Cannot Create Repository
  4194. #define  ERRCODE_DATABASEOPENFAILED     26   // Cannot Open a Database
  4195.  
  4196.  
  4197. #define  DBIERR_REPOSITORYCORRUPT    (ERRBASE_REPOSITORY + ERRCODE_REPOSITORYCORRUPT)
  4198. #define  DBIERR_INFOBLOBCORRUPT      (ERRBASE_REPOSITORY + ERRCODE_INFOBLOBCORRUPT)
  4199. #define  DBIERR_SCHEMACORRUPT        (ERRBASE_REPOSITORY + ERRCODE_SCHEMACORRUPT)
  4200. #define  DBIERR_ATTRTYPEEXISTS       (ERRBASE_REPOSITORY + ERRCODE_ATTRTYPEEXISTS)
  4201. #define  DBIERR_INVALIDOBJTYPE       (ERRBASE_REPOSITORY + ERRCODE_INVALIDOBJTYPE)
  4202. #define  DBIERR_INVALIDRELATIONTYPE  (ERRBASE_REPOSITORY + ERRCODE_INVALIDRELATIONTYPE)
  4203. #define  DBIERR_VIEWEXISTS           (ERRBASE_REPOSITORY + ERRCODE_VIEWEXISTS)
  4204. #define  DBIERR_NOSUCHVIEW           (ERRBASE_REPOSITORY + ERRCODE_NOSUCHVIEW)
  4205. #define  DBIERR_INVALIDRECCONSTRAINT (ERRBASE_REPOSITORY + ERRCODE_INVALIDRECCONSTRAINT)
  4206. #define  DBIERR_LDBCONNECTION        (ERRBASE_REPOSITORY + ERRCODE_LDBCONNECTION)
  4207. #define  DBIERR_REPOSITORYEXISTS     (ERRBASE_REPOSITORY + ERRCODE_REPOSITORYEXISTS)
  4208. #define  DBIERR_NOSUCHREPOSITORY     (ERRBASE_REPOSITORY + ERRCODE_NOSUCHREPOSITORY)
  4209. #define  DBIERR_REPOSITORYDBMISSING  (ERRBASE_REPOSITORY + ERRCODE_REPOSITORYDBMISSING)
  4210. #define  DBIERR_REPOSITORYOUTOFDATE  (ERRBASE_REPOSITORY + ERRCODE_REPOSITORYOUTOFDATE)
  4211. #define  DBIERR_REPOSITORYVERSION    (ERRBASE_REPOSITORY + ERRCODE_REPOSITORYVERSION)
  4212. #define  DBIERR_REPOSITORYNAME       (ERRBASE_REPOSITORY + ERRCODE_REPOSITORYNAME)
  4213. #define  DBIERR_DEPENDENTOBJECTS     (ERRBASE_REPOSITORY + ERRCODE_DEPENDENTOBJECTS)
  4214. #define  DBIERR_RELATIONLIMIT        (ERRBASE_REPOSITORY + ERRCODE_RELATIONLIMIT)
  4215. #define  DBIERR_RELATIONSHIPSEXIST   (ERRBASE_REPOSITORY + ERRCODE_RELATIONSHIPSEXIST)
  4216. #define  DBIERR_EXCHANGEFILECORRUPT  (ERRBASE_REPOSITORY + ERRCODE_EXCHANGEFILECORRUPT)
  4217. #define  DBIERR_EXCHANGEFILEVERSION  (ERRBASE_REPOSITORY + ERRCODE_EXCHANGEFILEVERSION)
  4218. #define  DBIERR_TYPEMISMATCH         (ERRBASE_REPOSITORY + ERRCODE_TYPEMISMATCH)
  4219. #define  DBIERR_OBJECTEXISTS         (ERRBASE_REPOSITORY + ERRCODE_OBJECTEXISTS)
  4220. #define  DBIERR_REPOSITORYACCESS     (ERRBASE_REPOSITORY + ERRCODE_REPOSITORYACCESS)
  4221. #define  DBIERR_REPOSITORYCREATE     (ERRBASE_REPOSITORY + ERRCODE_REPOSITORYCREATE)
  4222. #define  DBIERR_DATABASEOPENFAILED   (ERRBASE_REPOSITORY + ERRCODE_DATABASEOPENFAILED)
  4223.  
  4224. #endif  // NODBIERRS
  4225.  
  4226.  
  4227.  
  4228.  
  4229. #ifndef NODBIPROTOTYPES
  4230. //============================================================================
  4231. //                          DBI prototypes
  4232. //============================================================================
  4233.  
  4234. //                          Environmental
  4235. //----------------------------------------------------------------------------
  4236.  
  4237.  
  4238. DBIResult DBIFN DbiInitFn (           // Initialize the Engine
  4239.       UINT16          iVer,             // Interface Version
  4240.       pDBIEnv         pEnv              // Environment Structure/NULL
  4241.    );
  4242.  
  4243.     // DO NOT CALL THIS DIRECTLY. Use the 'DbiInit' define below.
  4244.  
  4245.     // Initializes the engine environment. Default settings can be overwritten
  4246.     // by supplying the appropriate settings. Defaults are read from the system
  4247.     // configuration file. pEnv can be NULLP to get the system defautls.
  4248.  
  4249. #define DbiInit(pEnv)     DbiInitFn(DBIINTFVER, pEnv)
  4250.  
  4251.  
  4252. DBIResult DBIFN DbiExit(VOID);        // Exit engine
  4253.  
  4254.  
  4255. //============================================================================
  4256. //                         System Level Info
  4257. //============================================================================
  4258.  
  4259. DBIResult DBIFN DbiGetSysVersion (    // Get system version info
  4260.       pSYSVersion    psysVersion
  4261.    );
  4262.  
  4263. DBIResult DBIFN DbiGetSysConfig (     // System configuration
  4264.       pSYSConfig     psysConfig
  4265.    );
  4266.  
  4267. DBIResult DBIFN DbiGetClientInfo (    // Get Client info
  4268.       pCLIENTInfo    pclientInfo
  4269.    );
  4270.  
  4271. DBIResult DBIFN DbiGetSysInfo (       // Get system status/info
  4272.       pSYSInfo       psysInfo
  4273.    );
  4274.  
  4275. DBIResult DBIFN DbiLoadDriver (       // Load a given driver
  4276.       pCHAR          pszDriverType      // Driver name
  4277.    );
  4278.  
  4279. //============================================================================
  4280. //                            Sessions
  4281. //============================================================================
  4282.  
  4283. DBIResult DBIFN DbiStartSession (     // Start a new session
  4284.       pCHAR          pszName,           // Name (Optional)
  4285.       phDBISes       phSes  ,           // Session
  4286.       pCHAR          pNetDir            // Netfile directory for session (opt)
  4287.    );
  4288.  
  4289. DBIResult DBIFN DbiGetCurrSession (   // Get the current session
  4290.       phDBISes       phSes              // Session
  4291.    );
  4292.  
  4293. DBIResult DBIFN DbiSetCurrSession (   // Set the current session
  4294.       hDBISes        hSes               // Session/NULL
  4295.    );
  4296.  
  4297. DBIResult DBIFN DbiCloseSession (     // Close the current session
  4298.       hDBISes        hSes               // Session
  4299.    );
  4300.  
  4301. DBIResult DBIFN DbiGetSesInfo (       // Get current session info
  4302.       pSESInfo       psesInfo
  4303.    );
  4304.  
  4305. DBIResult DBIFN DbiSetPrivateDir (    // Set Private Directory for session
  4306.       pCHAR          pszDir             // Directory name/NULL
  4307.    );
  4308.  
  4309.  
  4310. //============================================================================
  4311. //                     Datababase, Schema and File inquiry
  4312. //============================================================================
  4313.  
  4314.  
  4315.  
  4316. DBIResult DBIFN DbiOpenDatabase (     // Open a database
  4317.       pCHAR          pszDbName,         // Database name
  4318.       pCHAR          pszDbType,         // Database type (NULL: Universal)
  4319.       DBIOpenMode    eOpenMode,         // Open type
  4320.       DBIShareMode   eShareMode,        // Share type
  4321.       pCHAR          pszPassword,       // Password
  4322.       UINT16         iOptFlds,          // Number of optional Params
  4323.       pFLDDesc       pOptFldDesc,       // Optional Field Descriptors
  4324.       pBYTE          pOptParams,        // Optional Params
  4325.       phDBIDb        phDb               // Returnd database handle
  4326.     );
  4327.  
  4328. DBIResult DBIFN DbiSetDirectory (     // Set the current directory
  4329.       hDBIDb         hDb,               // Universal database handle
  4330.       pCHAR          pszDir             // Directory/NULL
  4331.     );
  4332.  
  4333. DBIResult DBIFN DbiGetDirectory (     // Get the current/default directory
  4334.       hDBIDb         hDb,               // Universal database handle
  4335.       BOOL           bDefault,          // True for default
  4336.       pCHAR          pszDir             // Returned directory
  4337.     );
  4338.  
  4339. DBIResult DBIFN DbiOpenTableList (    // Open a cursor on "Tables"
  4340.       hDBIDb         hDb,               // Database handle
  4341.       BOOL           bExtended,         // True for extended info
  4342.       BOOL           bSystem,           // True to include system tables
  4343.       pCHAR          pszWild,           // Wild card name
  4344.       phDBICur       phCur              // Returned cursor
  4345.     );
  4346.  
  4347. DBIResult DBIFN DbiOpenFileList (     // Open a cursor on "Files"
  4348.       hDBIDb         hDb,               // Universal database handle
  4349.       pCHAR          pszWild,           // Wild card name
  4350.       phDBICur       phCur              // Returned cursor
  4351.     );
  4352.  
  4353. DBIResult DBIFN DbiOpenIndexList (    // Return "Indexes" for a table
  4354.       hDBIDb         hDb,               // Database handle
  4355.       pCHAR          pszTableName,      // Table name
  4356.       pCHAR          pszDriverType,     // Driver type
  4357.       phDBICur       phCur);            // Returned cursor on "Indexes"
  4358.  
  4359. DBIResult DBIFN DbiOpenFieldList (    // Return "Fields" for a table
  4360.       hDBIDb         hDb,               // Database handle
  4361.       pCHAR          pszTableName,      // Table name
  4362.       pCHAR          pszDriverType,     // Driver type
  4363.       BOOL           bPhyTypes,         // True, for physical types
  4364.       phDBICur       phCur);            // Returned cursor on "Fields"
  4365.  
  4366. DBIResult DBIFN DbiOpenVchkList (     // Return "Checks" for a table
  4367.       hDBIDb         hDb,               // Database handle
  4368.       pCHAR          pszTableName,      // Table name
  4369.       pCHAR          pszDriverType,     // Driver Type
  4370.       phDBICur       phChkCur);         // Returned cursor on "Checks"
  4371.  
  4372. DBIResult DBIFN DbiOpenRintList (     // Return Integrity checks
  4373.       hDBIDb         hDb,               // Database handle
  4374.       pCHAR          pszTableName,      // Table name
  4375.       pCHAR          pszDriverType,     // Driver type
  4376.       phDBICur       phChkCur);         // Returned cursor on "Ref Int".
  4377.  
  4378. DBIResult DBIFN DbiOpenSecurityList ( // Return security descriptions
  4379.       hDBIDb         hDb,               // Database handle
  4380.       pCHAR          pszTableName,      // Table name
  4381.       pCHAR          pszDriverType,     // Driver type
  4382.       phDBICur       phSecCur           // Returned cursor on sec list
  4383.    );
  4384.  
  4385. DBIResult DBIFN DbiOpenFamilyList (   // Return family members
  4386.       hDBIDb         hDb,               // Database handle
  4387.       pCHAR          pszTableName,      // Table name
  4388.       pCHAR          pszDriverType,     // Driver type
  4389.       phDBICur       phFmlCur           // Returned cursor on "Family"
  4390.    );
  4391.  
  4392. DBIResult DBIFN DbiOpenSPList(        // Open a cursor on "Stored Procedures"
  4393.       hDBIDb         hDb,               // Universal database handle
  4394.       BOOL           bExtended,         // True for extended info (N/A)
  4395.       BOOL           bSystem,           // True to include system procedures
  4396.       pCHAR          pszQual,           // Qualifier (N/A)
  4397.       phDBICur       phCur              // Returned cursor
  4398.    );
  4399.  
  4400. DBIResult DBIFN DbiOpenSPParamList (    // Return "Parameters" for a stored procedure
  4401.       hDBIDb         hDb,               // Database handle
  4402.       pCHAR          pszSPName,         // Stored procedure name
  4403.       BOOL           bPhyTypes,         // True, for physical types
  4404.       UINT16         uOverload,         // Overload number
  4405.       phDBICur       phCur              // Returned cursor on "Parameters"
  4406.   );
  4407.  
  4408. DBIResult DBIFN DbiOpenFunctionList (    // Open a cursor on "Functions"
  4409.       hDBIDb         hDb,               // Universal database handle
  4410.       DBIFUNCOpts    eoptBits,          // Options for function list
  4411.       phDBICur       phCur              // Returned cursor on "Functions"
  4412.                                         // Record desc is of type DBIFUNCDesc
  4413.    );
  4414.  
  4415. DBIResult DBIFN DbiOpenFunctionArgList ( // Return "Arguments" for a function
  4416.       hDBIDb         hDb,               // Database handle
  4417.       pCHAR          pszFuncName,       // Function name
  4418.       UINT16         uOverload,         // Overload number
  4419.       phDBICur       phCur              // Returned cursor on "Arguments"
  4420.   );
  4421.  
  4422. DBIResult DBIFN DbiCloseDatabase (     // Close a database
  4423.       phDBIDb        phDb                // Pointer to database handle
  4424.     );
  4425.  
  4426. //============================================================================
  4427. //                                  Capabilities
  4428. //============================================================================
  4429.  
  4430. DBIResult DBIFN DbiOpenDriverList (   // Get a list of driver names
  4431.       phDBICur       phCur              // Returned cursor
  4432.    );
  4433.  
  4434. DBIResult DBIFN DbiGetDriverDesc (    // Get description for a given type
  4435.       pCHAR          pszDriverType,     // Symbolic name for driver type
  4436.       pDRVType       pdrvType           // Driver type description
  4437.    );
  4438.  
  4439. DBIResult DBIFN DbiOpenDatabaseList ( // Get a list of registered databases
  4440.       phDBICur       phCur              // Returned cursor
  4441.    );
  4442.  
  4443. DBIResult DBIFN DbiGetDatabaseDesc (  // Get a description of a logical db
  4444.       pCHAR          pszName,           // Name of logical database
  4445.       pDBDesc        pdbDesc            // Database description
  4446.    );
  4447.  
  4448. DBIResult DBIFN DbiOpenTableTypesList ( // Get a list of table types
  4449.       pCHAR          pszDriverType,     // Driver type
  4450.       phDBICur       phCur              // Returned cursor
  4451.    );
  4452.  
  4453. DBIResult DBIFN DbiGetTableTypeDesc ( // Get Table capabilities
  4454.       pCHAR          pszDriverType,     // Driver type
  4455.       pCHAR          pszTableType,      // Table type
  4456.       pTBLType       ptblType           // Table Capabilities
  4457.    );
  4458.  
  4459.  
  4460. DBIResult DBIFN DbiOpenFieldTypesList ( // Get a list of field types
  4461.       pCHAR          pszDriverType,     // Driver type
  4462.       pCHAR          pszTblType,        // Table type (Optional)
  4463.       phDBICur       phCur              // Returned cursor
  4464.    );
  4465.  
  4466. DBIResult DBIFN DbiGetFieldTypeDesc ( // Get list of field types
  4467.       pCHAR          pszDriverType,     // Driver type
  4468.       pCHAR          pszTableType,      // Table type
  4469.       pCHAR          pszFieldType,      // Field type  (Physical only)
  4470.       pFLDType       pfldType           // Field type description
  4471.    );
  4472.  
  4473. DBIResult DBIFN DbiOpenIndexTypesList ( // Get list of index types
  4474.       pCHAR          pszDriverType,     // Driver type
  4475.       phDBICur       phCur              // Returned cursor
  4476.    );
  4477.  
  4478. DBIResult DBIFN DbiGetIndexTypeDesc ( // Get description of given idx type
  4479.       pCHAR          pszDriverType,     // Driver type
  4480.       pCHAR          pszIndexType,      // Index type
  4481.       pIDXType       pidxType           // Index description
  4482.    );
  4483.  
  4484. DBIResult DBIFN DbiOpenLdList (       // Get a list of Lang Drivers
  4485.       phDBICur       phCur              // Returned cursor
  4486.    );
  4487.  
  4488. //===========================================================================
  4489. //                      Table Open, Properties & Structure
  4490. //===========================================================================
  4491.  
  4492. DBIResult DBIFN DbiOpenTable (        // Open a table
  4493.       hDBIDb         hDb,               // Database handle
  4494.       pCHAR          pszTableName,      // Table name or file name
  4495.       pCHAR          pszDriverType,     // Driver type                 /NULL
  4496.       pCHAR          pszIndexName,      // Index to be used for access /NULL
  4497.       pCHAR          pszIndexTagName,   // Index tag name              /NULL
  4498.       UINT16         iIndexId,          // Index number                /0
  4499.       DBIOpenMode    eOpenMode,         // Read or RW
  4500.       DBIShareMode   eShareMode,        // Excl or Share
  4501.       XLTMode        exltMode,          // Xlate mode
  4502.       BOOL           bUniDirectional,   // Uni or Bi directional
  4503.       pBYTE          pOptParams,        // Optional params /NULL
  4504.       phDBICur       phCursor           // Returns Cursor handle
  4505.     );
  4506.  
  4507.  
  4508. DBIResult DBIFN DbiGetCursorProps (   // Get Cursor properties
  4509.       hDBICur        hCursor,           // Cursor handle
  4510.       pCURProps      pcurProps          // Cursor properties
  4511.     );
  4512.  
  4513. DBIResult DBIFN DbiGetObjFromName (   // Get object from name
  4514.       DBIOBJType     eObjType   ,       // Object handle
  4515.       pCHAR          pszObjName ,       // Name of object /NULL
  4516.       phDBIObj       phObj              // Returned object handle
  4517.    );
  4518.  
  4519. DBIResult DBIFN DbiGetObjFromObj (    // Get associated object
  4520.       hDBIObj        hObj       ,       // Object handle
  4521.       DBIOBJType     eObjType   ,       // Type of associated object
  4522.       phDBIObj       phObj              // Returns object of eObjType
  4523.    );
  4524.  
  4525. DBIResult DBIFN DbiGetProp (          // Get property
  4526.       hDBIObj        hObj   ,           // Object handle
  4527.       UINT32         iProp  ,           // Property to retrieve
  4528.       pVOID          pPropValue,        // == NULL, validate iProp for getting
  4529.       UINT16         iMaxLen,           // Length of buffer pPropValue
  4530.       pUINT16        piLen              // Returns required length
  4531.    );
  4532.  
  4533. DBIResult DBIFN DbiSetProp (          // Set property
  4534.       hDBIObj        hObj   ,           // Object handle
  4535.       UINT32         iProp  ,           // Property to set
  4536.       UINT32         iPropValue         // Property value
  4537.    );
  4538.  
  4539. DBIResult DBIFN DbiValidateProp (     // Validate a property
  4540.       hDBIObj        hObj,              // Object handle
  4541.       UINT32         iProp,             // property to validate
  4542.       BOOL           bSetting           // TRUE:setting, FALSE:getting
  4543.   );
  4544.  
  4545. DBIResult DBIFN DbiGetFieldDescs (    // Get field descriptions
  4546.       hDBICur        hCursor,           // Cursor handle
  4547.       pFLDDesc       pfldDesc           // Array of field descriptors
  4548.     );
  4549.  
  4550. DBIResult DBIFN DbiGetCursorForTable (// Find cursor for a given table
  4551.       hDBIDb         hDb,               // Database handle
  4552.       pCHAR          pszTableName,      // Table name
  4553.       pCHAR          pszDriverType,     // Driver type / NULL
  4554.       phDBICur       phCursor           // Returned cursor
  4555.    );
  4556.  
  4557. DBIResult DBIFN DbiCloneCursor (      // Return a duplicate cursor
  4558.       hDBICur        hCurSrc,           // Source cursor
  4559.       BOOL           bReadOnly,         // If TRUE, read only mode
  4560.       BOOL           bUniDirectional,   // If TRUE, Uni directional
  4561.       phDBICur       phCurNew           // Destination cursor address
  4562.     );
  4563.  
  4564. DBIResult DBIFN DbiCloseCursor (      // Closes cursor
  4565.       phDBICur       phCursor           // Pntr to Cursor handle
  4566.     );
  4567.  
  4568.  
  4569. //============================================================================
  4570. //                      Index Manipulation & Usage
  4571. //============================================================================
  4572.  
  4573. DBIResult DBIFN DbiOpenIndex (        // Open an index
  4574.       hDBICur        hCursor,           // Cursor handle
  4575.       pCHAR          pszIndexName,      // Index Name
  4576.       UINT16         iIndexId           // Index number (if applicable)
  4577.    );
  4578.  
  4579. DBIResult DBIFN DbiCloseIndex (       // Close an index
  4580.       hDBICur        hCursor,           // Cursor handle
  4581.       pCHAR          pszIndexName,      // Index Name
  4582.       UINT16         iIndexId           // Index number
  4583.    );
  4584.  
  4585. DBIResult DBIFN DbiSwitchToIndex (    // Change index order of access
  4586.       phDBICur       phCursor,          // Cursor handle (In/Out)
  4587.       pCHAR          pszIndexName,      // Index name
  4588.       pCHAR          pszTagName,        // Tag name (if applicable)
  4589.       UINT16         iIndexId,          // Index number
  4590.       BOOL           bCurrRec           // Position at current rec
  4591.     );
  4592.  
  4593. DBIResult DBIFN DbiGetIndexDesc (     // Get index properties
  4594.       hDBICur        hCursor,           // Cursor handle
  4595.       UINT16         iIndexSeqNo,       // Index number
  4596.       pIDXDesc       pidxDesc           // Returned index description
  4597.    );
  4598.  
  4599. DBIResult DBIFN DbiGetIndexDescs (    // Get index properties
  4600.       hDBICur        hCursor,           // Cursor handle
  4601.       pIDXDesc       pidxDesc           // Returned index descriptors
  4602.    );
  4603.  
  4604. DBIResult DBIFN DbiGetIndexForField ( // Get index desc for given field
  4605.       hDBICur        hCursor,           // Cursor handle
  4606.       UINT16         iFld,              // Field Number (1..N)
  4607.       BOOL           bProdTagOnly,      // If TRUE, only xBASE prod tags will be returned
  4608.       pIDXDesc       pidxDesc           // (Optional)
  4609.    );
  4610.  
  4611. DBIResult DBIFN DbiGetIndexSeqNo(     // Get index sequence number
  4612.       hDBICur        hCursor,           // Cursor handle
  4613.       pCHAR          pszIndexName,      // Index name
  4614.       pCHAR          pszTagName,        // Tag name (if applicable)
  4615.       UINT16         iIndexId,          // Index number
  4616.       pUINT16        piIndexSeqNo       // Index number
  4617.    );
  4618.  
  4619. DBIResult DBIFN DbiSetToKey  (        // Set key condition
  4620.       hDBICur           hCursor,        // Cursor handle
  4621.       DBISearchCond     eSearchCond,    // Search condition (default is =)
  4622.       BOOL              bDirectKey,     // Key is supplied directly
  4623.       UINT16            iFields,        // No of full fields to match
  4624.       UINT16            iLen,           // Partial key len of last field
  4625.       pBYTE             pBuff           // Either Record buffer or Key itself
  4626.     );
  4627.  
  4628. DBIResult DBIFN DbiExtractKey (       // Get the key value of current record
  4629.       hDBICur           hCursor,        // Cursor handle
  4630.       pBYTE             pRecBuf,        // Record buffer (optional)
  4631.       pBYTE             pKeyBuf         // Returned. Key bytes.
  4632.    );
  4633.  
  4634. DBIResult DBIFN DbiSetRange (         // Set cursor to a range
  4635.       hDBICur           hCursor,        // Cursor
  4636.       BOOL              bKeyItself,     // Whether Key or Record buffer
  4637.       UINT16            iFields1,       // Key fields to be mathced in full
  4638.       UINT16            iLen1,          // Key length to compare
  4639.       pBYTE             pKey1,          // Top/Left key in Range
  4640.       BOOL              bKey1Incl,      // If Inclusive of Key1
  4641.       UINT16            iFields2,       // Key fields to be mathced in full
  4642.       UINT16            iLen2,          // Key length to compare
  4643.       pBYTE             pKey2,          // Bottom/Right key in Range
  4644.       BOOL              bKey2Incl       // If Inclusive of Key2
  4645.    );
  4646.  
  4647. DBIResult DBIFN DbiResetRange (       // Reset range
  4648.       hDBICur        hCursor            // cursor handle
  4649.    );
  4650.  
  4651. DBIResult DBIFN DbiCompareKeys (      // Compare two keys
  4652.       hDBICur           hCursor,        // Cursor handle
  4653.       pBYTE             pKey1,          // Key buffer 1 to compare
  4654.       pBYTE             pKey2,          // Key buffer 2 (Or NULL)
  4655.       UINT16            iFields,        // Fields to compare in full
  4656.       UINT16            iLen,           // Partial key to compare
  4657.       pINT16            piResult        // Compare result
  4658.    );
  4659.  
  4660. DBIResult DBIFN DbiGetRecordForKey (  // Find a record matching key
  4661.       hDBICur           hCursor,        // Cursor handle
  4662.       BOOL              bDirectKey,     // Key is supplied directly
  4663.       UINT16            iFields,        // No of full fields to match
  4664.       UINT16            iLen,           // Partial key len of last field
  4665.       pBYTE             pKey,           // Either Record buffer or Key itself
  4666.       pBYTE             pRecBuff        // (Optional) Record buffer
  4667.    );
  4668.  
  4669. //=============================================================================
  4670. //                          Validity check and referential integrity
  4671. //=============================================================================
  4672.  
  4673. DBIResult DBIFN DbiGetVchkDesc (      // Get valcheck descriptor
  4674.       hDBICur        hCursor,           // Cursor handle
  4675.       UINT16         iValSeqNo,         // Valcheck sequence number
  4676.       pVCHKDesc      pvalDesc           // Returned valcheck description
  4677.    );
  4678.  
  4679. DBIResult DBIFN DbiGetRintDesc (      // Get referential integrity descriptor
  4680.       hDBICur        hCursor,           // Cursor handle
  4681.       UINT16         iRintSeqNo,        // Rint sequence number
  4682.       pRINTDesc      printDesc          // Returned rint description
  4683.    );
  4684.  
  4685. //=============================================================================
  4686. //                              Cursor Maintenance
  4687. //=============================================================================
  4688.  
  4689.  
  4690. DBIResult DBIFN DbiSetToBegin (       // Reset cursor to beginning
  4691.       hDBICur        hCursor            // Cursor handle
  4692.    );
  4693.  
  4694. DBIResult DBIFN DbiSetToEnd (         // Reset cursor to ending
  4695.       hDBICur        hCursor            // Cursor handle
  4696.     );
  4697.  
  4698. DBIResult DBIFN DbiSetToCursor (      // Set cursor to another cursor position
  4699.       hDBICur        hDest,             // Destination cursor
  4700.       hDBICur        hSrc               // Source cursor
  4701.    );
  4702.  
  4703. DBIResult DBIFN DbiGetBookMark (      // Get a book-mark
  4704.       hDBICur        hCur,              // Cursor
  4705.       pBYTE          pBookMark          // Pointer to Book-Mark
  4706.    );
  4707.  
  4708. DBIResult DBIFN DbiSetToBookMark (    // Position to a Book-Mark
  4709.       hDBICur        hCur,              // Cursor
  4710.       pBYTE          pBookMark          // Pointer to Book-Mark
  4711.    );
  4712.  
  4713. DBIResult DBIFN DbiCompareBookMarks ( // Compare two Book-marks
  4714.       hDBICur        hCur,              // Cursor
  4715.       pBYTE          pBookMark1,        // Book mark 1
  4716.       pBYTE          pBookMark2,        // Book mark 2
  4717.       pCMPBkMkRslt   pCmpBkmkResult     // Compare result
  4718.    );
  4719.  
  4720. //============================================================================
  4721. //                      Data Access: Logical Record Level
  4722. //============================================================================
  4723.  
  4724.  
  4725. DBIResult DBIFN DbiGetNextRecord (    // Find/Get the next record
  4726.       hDBICur           hCursor,        // Cursor handle
  4727.       DBILockType       eLock,          // Optional lock request
  4728.       pBYTE             pRecBuff,       // Record buffer(client)
  4729.       pRECProps         precProps       // Optional record properties
  4730.     );
  4731.  
  4732. DBIResult DBIFN DbiGetPriorRecord (   // Find/Get the prior record
  4733.       hDBICur           hCursor,        // Cursor handle
  4734.       DBILockType       eLock,          // Optional lock request
  4735.       pBYTE             pRecBuff,       // Record buffer (client)
  4736.       pRECProps         precProps       // Optional record properties
  4737.     );
  4738.  
  4739. DBIResult DBIFN DbiGetRecord (        // Gets the current record
  4740.       hDBICur           hCursor,        // Cursor handle
  4741.       DBILockType       eLock,          // Optional lock request
  4742.       pBYTE             pRecBuff,       // Record buffer(client)
  4743.       pRECProps         precProps       // Optional record properties
  4744.     );
  4745.  
  4746. DBIResult DBIFN DbiGetRelativeRecord (// Find/Get a record by record number
  4747.       hDBICur           hCursor,        // Cursor handle
  4748.       INT32             iPosOffset,     // offset from current position
  4749.       DBILockType       eLock,          // Optional lock request
  4750.       pBYTE             pRecBuff,       // Record buffer(client)
  4751.       pRECProps         precProps       // Optional record properties
  4752.     );
  4753.  
  4754. DBIResult DBIFN DbiInitRecord (       // Initialize record area
  4755.       hDBICur        hCursor,           // Cursor handle
  4756.       pBYTE          pRecBuff           // Record buffer
  4757.     );
  4758.  
  4759. DBIResult DBIFN DbiInsertRecord (     // Inserts a new record
  4760.       hDBICur        hCursor,           // Cursor handle
  4761.       DBILockType    eLock,             // Optional lock on this rec
  4762.       pBYTE          pRecBuff           // New Record (client)
  4763.     );
  4764.  
  4765. DBIResult DBIFN DbiModifyRecord (     // Updates the current record
  4766.       hDBICur        hCursor,           // Cursor handle
  4767.       pBYTE          pRecBuf,           // Modified record
  4768.       BOOL           bFreeLock          // Free record lock
  4769.     );
  4770.  
  4771. DBIResult DBIFN DbiDeleteRecord (     // Deletes the current record
  4772.       hDBICur        hCursor,           // Cursor handle
  4773.       pBYTE          pRecBuf            // Copy of deleted record
  4774.     );
  4775.  
  4776. DBIResult DBIFN DbiReadBlock (        // Read a block of records
  4777.       hDBICur        hCursor,           // Cursor handle
  4778.       pUINT32        piRecords,         // Number of records to read
  4779.       pBYTE          pBuf               // Buffer
  4780.    );
  4781.  
  4782. DBIResult DBIFN DbiWriteBlock (       // Write a block of records
  4783.       hDBICur        hCursor,           // Cursor handle
  4784.       pUINT32        piRecords,         // Number of records to write/written
  4785.       pBYTE          pBuf               // Buffer
  4786.    );
  4787.  
  4788. DBIResult DBIFN DbiAppendRecord (     // Inserts a new record
  4789.       hDBICur        hCursor,           // Cursor handle
  4790.       pBYTE          pRecBuff           // New Record (client)
  4791.     );
  4792.  
  4793. DBIResult DBIFN DbiUndeleteRecord (   // Undeletes the current record
  4794.       hDBICur        hCursor            // Cursor handle
  4795.     );
  4796.  
  4797. DBIResult DBIFN DbiGetSeqNo (         // Get logical record number
  4798.       hDBICur        hCursor,           // Cursor handle
  4799.       pUINT32        piSeqNo            // Pointer to sequence number
  4800.    );
  4801.  
  4802. DBIResult DBIFN DbiSetToSeqNo (       // Position to a logical record number
  4803.       hDBICur        hCursor,           // Cursor handle
  4804.       UINT32         iSeqNo             // Sequence number
  4805.    );
  4806.  
  4807. DBIResult DBIFN DbiGetRecordCount (   // Get the current number of records
  4808.       hDBICur        hCursor,           // Cursor handle
  4809.       pUINT32        piRecCount         // Number of records
  4810.    );
  4811.  
  4812.  
  4813. DBIResult DBIFN DbiSetToRecordNo (    // Position to Physical Rec#
  4814.       hDBICur        hCursor,           // Cursor handle
  4815.       UINT32         iRecNo             // Physical record number
  4816.    );
  4817.  
  4818. DBIResult DBIFN DbiSaveChanges (      // Flush all buffered changes
  4819.       hDBICur        hCursor            // Cursor handle
  4820.    );
  4821. DBIResult DBIFN DbiForceReread (      // Force Reread of buffers from Disk
  4822.       hDBICur        hCursor            // Cursor
  4823.    );
  4824.  
  4825. DBIResult DBIFN DbiCheckRefresh (VOID); // Check refresh for session
  4826.  
  4827. DBIResult DBIFN DbiMakePermanent (    // Make temporary table permanent
  4828.       hDBICur     hCursor,              // Cursor handle
  4829.       pCHAR       pszName,              // Rename temporary table
  4830.       BOOL        bOverWrite            // Overwrite existing file
  4831.    );
  4832.  
  4833. DBIResult DBIFN DbiForceRecordReread (// Force Reread of current record from Server
  4834.       hDBICur     hCursor,              // Cursor handle
  4835.       pBYTE       pRecBuff              // Returned : record buffer
  4836.    );
  4837.  
  4838.  
  4839. //============================================================================
  4840. //                            Field Level Access
  4841. //============================================================================
  4842.  
  4843. DBIResult DBIFN DbiGetField(          // Get Field value
  4844.       hDBICur        hCursor,           // Cursor
  4845.       UINT16         iField,            // Field # (1..n)
  4846.       pBYTE          pRecBuff,          // Record buffer
  4847.       pBYTE          pDest,             // Destination field buffer
  4848.       pBOOL          pbBlank            // Returned : is field blank
  4849.    );
  4850.  
  4851. DBIResult DBIFN DbiPutField(          // Put a value in the record buffer
  4852.       hDBICur        hCursor,           // Cursor
  4853.       UINT16         iField,            // Field # (1..n)
  4854.       pBYTE          pRecBuff,          // Record buffer
  4855.       pBYTE          pSrc               // Source field buffer
  4856.    );
  4857.  
  4858. DBIResult DBIFN DbiVerifyField(       // Verifies the field value
  4859.       hDBICur        hCursor,           // Cursor
  4860.       UINT16         iField,            // Field # (1..n)
  4861.       pBYTE          pSrc,              // Field Value
  4862.       pBOOL          pbBlank            // Field is Blank (Returned)
  4863.    );
  4864.  
  4865. DBIResult DBIFN DbiOpenBlob (         // Open a blob for access
  4866.       hDBICur        hCursor,           // Cursor handle
  4867.       pBYTE          pRecBuf,           // Record Buffer
  4868.       UINT16         iField,            // Field number (1..n)
  4869.       DBIOpenMode    eOpenMode          // Open for Read or RW
  4870.     );
  4871.  
  4872. DBIResult DBIFN DbiGetBlobSize (      // Gets the size of a blob
  4873.       hDBICur        hCursor,           // Cursor handle
  4874.       pBYTE          pRecBuf,           // Record Buffer
  4875.       UINT16         iField,            // Field number of blob (1..n)
  4876.       pUINT32        piSize             // Blob size in bytes
  4877.     );
  4878.  
  4879. DBIResult DBIFN DbiGetBlob (          // Read bytes from blob
  4880.       hDBICur        hCursor,           // Cursor handle
  4881.       pBYTE          pRecBuf,           // Record Buffer
  4882.       UINT16         iField,            // Field number of blob (1..n)
  4883.       UINT32         iOffSet,           // Starting position
  4884.       UINT32         iLen,              // No of bytes to be read
  4885.       pBYTE          pDest,             // Destination
  4886.       pUINT32        piRead             // Actual no of bytes read
  4887.     );
  4888.  
  4889. DBIResult DBIFN DbiPutBlob (          // Write bytes to blob
  4890.       hDBICur        hCursor,           // Cursor handle
  4891.       pBYTE          pRecBuf,           // Record Buffer
  4892.       UINT16         iField,            // Field number of blob (1..n)
  4893.       UINT32         iOffSet,           // Starting position
  4894.       UINT32         iLen,              // No of bytes to put
  4895.       pBYTE          pSrc               // pntr to Source
  4896.     );
  4897.  
  4898. DBIResult DBIFN DbiTruncateBlob (     // Reduces the blob size
  4899.       hDBICur        hCursor,           // Cursor handle
  4900.       pBYTE          pRecBuf,           // Record Buffer
  4901.       UINT16         iField,            // Field number of blob (1..n)
  4902.       UINT32         iLen               // New blob length
  4903.     );
  4904.  
  4905. DBIResult DBIFN DbiFreeBlob (         // Closes the blob
  4906.       hDBICur           hCursor,        // Cursor handle
  4907.       pBYTE             pRecBuf,        // Record Buffer
  4908.       UINT16            iField          // Field number of blob (0..n)
  4909.     );
  4910.  
  4911. DBIResult DBIFN DbiGetBlobHeading (   // Get Blob Heading
  4912.       hDBICur           hCursor,        // Cursor handle
  4913.       UINT16            iField,         // Field number of blob (1..n)
  4914.       pBYTE             pRecBuf,        // Record buffer of owner record
  4915.       pBYTE             pDest           // Destination buffer
  4916.    );
  4917.  
  4918. DBIResult DBIFN DbiSetFieldMap(       // Set a fieldmap
  4919.       hDBICur        hCur,              // Cursor handle
  4920.       UINT16         iFields,           // Number of fields
  4921.       pFLDDesc       pFldDesc           // Array of field descriptions
  4922.    );
  4923.  
  4924.  
  4925. //=============================================================================
  4926. //                                TRANSACTIONS
  4927. //=============================================================================
  4928.  
  4929. DBIResult DBIFN DbiBeginTran (        // Begin a transaction
  4930.    hDBIDb         hDb,                  // Database handle
  4931.    eXILType       eXIL,                 // Transaction isolation level
  4932.    phDBIXact      phXact                // Returned Xact handle
  4933. );
  4934.  
  4935. DBIResult DBIFN DbiEndTran (          // End a transaction
  4936.    hDBIDb         hDb,                  // Database handle
  4937.    hDBIXact       hXact,                // Xact handle
  4938.    eXEnd          eEnd                  // Xact end type
  4939. );
  4940.  
  4941. DBIResult DBIFN DbiGetTranInfo (      // Get transaction info
  4942.    hDBIDb         hDb,                  // Database handle
  4943.    hDBIXact       hXact,                // Xact handle
  4944.    pXInfo         pxInfo                // Xact info
  4945. );
  4946.  
  4947. //=============================================================================
  4948. //                                  LOCKING
  4949. //=============================================================================
  4950.  
  4951. DBIResult DBIFN DbiAcqTableLock (     // Lock a table
  4952.       hDBICur        hCursor,           // Cursor handle
  4953.       DBILockType    eLockType          // Lock type
  4954.     );
  4955.  
  4956. DBIResult DBIFN DbiAcqPersistTableLock (// Get a persistent lock
  4957.       hDBIDb         hDb,               // Database handle
  4958.       pCHAR          pszTableName,      // Table name
  4959.       pCHAR          pszDriverType      // Driver type / NULL
  4960.    );
  4961.  
  4962. DBIResult DBIFN DbiRelPersistTableLock (// Releases a persistent lock
  4963.       hDBIDb         hDb,               // Database handle
  4964.       pCHAR          pszTableName,      // Table name
  4965.       pCHAR          pszDriverType      // Driver type / NULL
  4966.    );
  4967.  
  4968. DBIResult DBIFN DbiRelTableLock (     // Unlocks Table level locks
  4969.       hDBICur        hCursor,           // Cursor handle
  4970.       BOOL           bAll,              // True for all table level locks
  4971.       DBILockType    eLockType          // Specific lock type
  4972.     );
  4973.  
  4974. DBIResult DBIFN DbiRelRecordLock (    // Releases record level locks
  4975.       hDBICur        hCursor,           // Cursor handle
  4976.       BOOL           bAll               // True for all. Default Current.
  4977.     );
  4978.  
  4979. DBIResult DBIFN DbiIsRecordLocked (   // Check if current record is locked
  4980.       hDBICur        hCursor,           // Cursor handle
  4981.       pBOOL          pbLocked           // Rec lock status
  4982.    );
  4983.  
  4984. DBIResult DBIFN DbiIsTableLocked (    // Verify if Table is locked
  4985.       hDBICur        hCursor,           // Cursor handle
  4986.       DBILockType    epdxLock,          // Lock type to verify
  4987.       pUINT16        piLocks            // Nbr of locks of the given type
  4988.    );
  4989.  
  4990. DBIResult DBIFN DbiIsTableShared (    // Verify if this is a shared table
  4991.       hDBICur        hCursor,           // Cursor handle
  4992.       pBOOL          pbShared           // Shared status
  4993.    );
  4994.  
  4995. DBIResult DBIFN DbiOpenLockList (     // Get a list of locks
  4996.       hDBICur        hCursor,           // Cursor handle
  4997.       BOOL           bAllUsers,         // True, for all Users locks
  4998.       BOOL           bAllLockTypes,     // True, for all lock types
  4999.       phDBICur       phLocks            // Returned cursor on Lock list
  5000.    );
  5001.  
  5002. DBIResult DBIFN DbiOpenUserList (     // Get a list of users loggedin
  5003.       phDBICur       phUsers            // Returned cursor on user list
  5004.    );
  5005.  
  5006. DBIResult DBIFN DbiSetLockRetry (     // Set Lock wait time
  5007.       INT16          iWait              // Time in seconds
  5008.    );
  5009.  
  5010. //============================================================================
  5011. //                              Batch Operations
  5012. //============================================================================
  5013.  
  5014.  
  5015. DBIResult DBIFN DbiBatchMove (        // Copy records to destination table
  5016.    pBATTblDesc    pSrcTblDesc,          // Source table identification,
  5017.    hDBICur        hSrcCur,              //  OR source cursor  ( one must be NULL )
  5018.    pBATTblDesc    pDstTblDesc ,         // Destination table identification,
  5019.    hDBICur        hDstCur,              //  OR destination cursor ( one must be NULL )
  5020.    eBATMode       ebatMode,             // Batch mode
  5021.    UINT16         iFldCount,            // Size of field maps
  5022.    pUINT16        pSrcFldMap,           // Array of source field numbers
  5023.    pCHAR          pszIndexName,         // If update mode, used to match records
  5024.    pCHAR          pszIndexTagName,      // Index tag name
  5025.    UINT16         iIndexId,             // Index  id
  5026.    pCHAR          pszKeyviolName,       // Keyviol table name  (optional)
  5027.    pCHAR          pszProblemsName,      // Problems table name (optional)
  5028.    pCHAR          pszChangedName,       // Changed table name (optional)
  5029.    pUINT32        plProbRecs,           // Number records written to problem table
  5030.    pUINT32        plKeyvRecs,           // Number records written to keyv table
  5031.    pUINT32        plChangedRecs,        // Number records written to changed table
  5032.    BOOL           bAbortOnFirstProb,    // If TRUE, abort on first problem rec
  5033.    BOOL           bAbortOnFirstKeyviol, // If TRUE, abort on first keyviol rec
  5034.    pUINT32        plRecsToMove,         // Number of records to read from source
  5035.                                         // Returns number actually read
  5036.    BOOL           bTransliterate        // If TRUE, transliterate character data
  5037.                                         // in fields between src&dst char sets
  5038. );
  5039.  
  5040. DBIResult DBIFN DbiCopyTable (        // Copy one table to another
  5041.       hDBIDb         hDb,               // Database handle
  5042.       BOOL           bOverWrite,        // True, to overwrite existing file
  5043.       pCHAR          pszSrcTableName,   // Source table name
  5044.       pCHAR          pszSrcDriverType,  // Source driver type
  5045.       pCHAR          pszDestTableName   // Destination table name
  5046.    );
  5047.  
  5048. DBIResult DBIFN DbiEmptyTable (       // Deletes all records
  5049.       hDBIDb         hDb,               // Database handle
  5050.       hDBICur        hCursor,           // Cursor (OR)
  5051.       pCHAR          pszTableName,      // Table name
  5052.       pCHAR          pszDriverType      // Driver type /NULL
  5053.     );
  5054.  
  5055. DBIResult DBIFN DbiPackTable (        // Pack a table
  5056.       hDBIDb         hDb,               // Database handle
  5057.       hDBICur        hCursor,           // Cursor (OR)
  5058.       pCHAR          pszTableName,      // Table name
  5059.       pCHAR          pszDriverType,     // Driver type /NULL
  5060.       BOOL           bRegenIdxs         // Regenerate indexes
  5061.     );
  5062.  
  5063. DBIResult DBIFN DbiRegenIndex (       // Regenerate an index
  5064.       hDBIDb         hDb,               // Database handle
  5065.       hDBICur        hCursor,           // Cursor (OR)
  5066.       pCHAR          pszTableName,      // Table name
  5067.       pCHAR          pszDriverType,     // Driver type /NULL
  5068.       pCHAR          pszIndexName,      // Index name
  5069.       pCHAR          pszIndexTagName,   // Index tagname (xbase MDX)
  5070.       UINT16         iIndexId           // Index number
  5071.     );
  5072.  
  5073. DBIResult DBIFN DbiRegenIndexes (     // Regenerate all indexes
  5074.       hDBICur         hCursor           // Cursor
  5075.    );
  5076.  
  5077. DBIResult DBIFN DbiSortTable (        // Sort table
  5078.       hDBIDb         hDb,               // Database handle
  5079.       pCHAR          pszTableName,      // Table name of source
  5080.       pCHAR          pszDriverType,     // Driver type /NULL
  5081.       hDBICur        hSrcCur,           // OR cursor of table to sort
  5082.       pCHAR          pszSortedName,     // Destination table (NULL if sort to self)
  5083.       phDBICur       phSortedCur,       // If non-null, return cursor on destination
  5084.       hDBICur        hDstCur,           // OR cursor of destination
  5085.       UINT16         iSortFields,       // Number of sort fields
  5086.       pUINT16        piFieldNum,        // Array of field numbers
  5087.       pBOOL          pbCaseInsensitive, // Which fields should sort c-i (Opt)
  5088.       pSORTOrder     pSortOrder,        // Array of Sort orders (Opt)
  5089.       pfSORTCompFn   *ppfSortFn,        // Array of compare fn pntrs (Opt)
  5090.       BOOL           bRemoveDups,       // TRUE : Remove duplicates
  5091.       hDBICur        hDuplicatesCur,    // Cursor to duplicates table (Opt)
  5092.       pUINT32        plRecsSort         // In/out param. - sort this number
  5093.                                         // of records from current position, return
  5094.                                         // number actually output to dest.  (Opt)
  5095. );
  5096.  
  5097.  
  5098. //============================================================================
  5099. //                           Create & Restructure
  5100. //============================================================================
  5101.  
  5102. DBIResult DBIFN DbiCreateTable (      // Create a new table
  5103.       hDBIDb         hDb,               // Database handle
  5104.       BOOL           bOverWrite,        // True, to overwrite existing file.
  5105.       pCRTblDesc     pcrTblDsc          // Table description
  5106.    );
  5107.  
  5108. DBIResult DBIFN DbiCreateInMemTable ( // Create a temporary table (Logical)
  5109.       hDBIDb         hDb,               // Database handle
  5110.       pCHAR          pszName,           // Logical Name
  5111.       UINT16         iFields,           // No of fields
  5112.       pFLDDesc       pfldDesc,          // Array of field descriptors
  5113.       phDBICur       phCursor           // Returned cursor handle
  5114.    );
  5115.  
  5116. DBIResult DBIFN DbiCreateTempTable (  // Create temporary table (Physical)
  5117.       hDBIDb         hDb,               // Database handle
  5118.       pCRTblDesc     pcrTblDsc,         // Table description
  5119.       phDBICur       phCursor           // Returned cursor on table
  5120.    );
  5121.  
  5122. DBIResult DBIFN DbiDoRestructure (    // Restructure a table
  5123.       hDBIDb         hDb,               // Database handle
  5124.       UINT16         iTblDescCount,     // Number of table descriptors (1)
  5125.       pCRTblDesc     pTblDesc,          // Array of table descs
  5126.       pCHAR          pszSaveAs,         // Restructure to this table
  5127.       pCHAR          pszKeyviolName,    // Keyviol table name  (optional)
  5128.       pCHAR          pszProblemsName,   // Problems table name (optional)
  5129.       BOOL           bAnalyzeOnly       // Analyze restructure
  5130.    );
  5131.  
  5132. DBIResult DBIFN DbiRenameTable (      // Rename table & family
  5133.       hDBIDb         hDb,               // Database handle
  5134.       pCHAR          pszOldName,        // Old name
  5135.       pCHAR          pszDriverType,     // Driver type /NULL
  5136.       pCHAR          pszNewName         // New name
  5137.    );
  5138.  
  5139. DBIResult DBIFN DbiDeleteTable (      // Delete a table
  5140.       hDBIDb         hDb,               // Database handle
  5141.       pCHAR          pszTableName,      // Name including any path
  5142.       pCHAR          pszDriverType      // Driver type /NULL
  5143.    );
  5144.  
  5145. DBIResult DBIFN DbiAddIndex (         // Add a new index
  5146.       hDBIDb         hDb,               // Database handle
  5147.       hDBICur        hCursor,           // Cursor (OR)
  5148.       pCHAR          pszTableName,      // Table name including any path
  5149.       pCHAR          pszDriverType,     // Driver type /NULL
  5150.       pIDXDesc       pIdxDesc    ,      // Description of the index
  5151.       pCHAR          pszKeyviolName     // Keyviol table name (optional)
  5152.    );
  5153.  
  5154. DBIResult DBIFN DbiDeleteIndex (      // Delete index
  5155.       hDBIDb         hDb,               // Database handle
  5156.       hDBICur        hCursor,           // Cursor (OR)
  5157.       pCHAR          pszTableName,      // Table name
  5158.       pCHAR          pszDriverType,     // Driver type /NULL
  5159.       pCHAR          pszIndexName,      // Index name
  5160.       pCHAR          pszIndexTagName,   // Index tagname (xbase MDX)
  5161.       UINT16         iIndexId           // Index number
  5162.    );
  5163.  
  5164. //===========================================================================
  5165. //                            Error Info
  5166. //===========================================================================
  5167.  
  5168. DBIResult DBIFN DbiGetErrorEntry (    // Get error entry
  5169.       UINT16         uEntry,            // Error stack entry
  5170.       pUINT32        pulNativeError,    // Returned. Native error code, if any
  5171.       pCHAR          pszError           // Returned. Error string, if any
  5172.    );
  5173.  
  5174. DBIResult DBIFN DbiGetErrorInfo (     // Return info on last error
  5175.       BOOL           bFull,             // If Full details
  5176.       pDBIErrInfo    pErrInfo           // Error Info
  5177.    );
  5178.  
  5179. DBIResult DBIFN DbiGetErrorString (   // Get message for error code
  5180.       DBIResult      rslt,              // Engine error code
  5181.       pCHAR          pszError           // Error string for the error
  5182.    );
  5183.  
  5184. DBIResult DBIFN DbiGetErrorContext (  // Get specific Context if available
  5185.       INT16          eContext,          // Context type
  5186.       pCHAR          pszContext         // Context string (MAXMSGLEN +1)
  5187.    );
  5188.  
  5189. //============================================================================
  5190. //                              Dbi Services
  5191. //============================================================================
  5192.  
  5193. DBIResult DBIFN DbiDateEncode (       // Encode Date components into Date
  5194.       UINT16         iMon,              // Month    (1..12)
  5195.       UINT16         iDay,              // Day      (1..31)
  5196.       INT16          iYear,             // Year     (0..2**16-1)
  5197.       pDBIDATE       pdateD             // Encoded date
  5198.    );
  5199.  
  5200. DBIResult DBIFN DbiDateDecode (       // Decode Date into components
  5201.       DBIDATE        dateD,             // Encoded Date
  5202.       pUINT16        piMon,             // Month
  5203.       pUINT16        piDay,             // Day
  5204.       pINT16         piYear             // Year
  5205.    );
  5206.  
  5207. DBIResult DBIFN DbiTimeEncode (       // Encode Time components into TIME
  5208.       UINT16         iHour,             // Hours (0..23)
  5209.       UINT16         iMin,              // Minutes (0..59)
  5210.       UINT16         iMilSec,           // Milli Seconds (0..59999)
  5211.       pTIME          ptimeT             // Encoded Time
  5212.    );
  5213.  
  5214. DBIResult DBIFN DbiTimeDecode (       // Decode TIME into components
  5215.       TIME           timeT,             // Encoded Time
  5216.       pUINT16        piHour,            // Hours (0..23)
  5217.       pUINT16        piMin,             // Minutes (0..59)
  5218.       pUINT16        piMilSec           // Milli Seconds (0..59999)
  5219.    );
  5220.  
  5221. DBIResult DBIFN DbiTimeStampEncode (  // Encode Date & TIme into Date+Time
  5222.       DBIDATE        dateD,             // Encoded Date
  5223.       TIME           timeT,             // Encoded Time
  5224.       pTIMESTAMP     ptsTS              // Encoded Date+Time
  5225.    );
  5226.  
  5227. DBIResult DBIFN DbiTimeStampDecode (  // Decode Date & Time from Date+Time
  5228.       TIMESTAMP      tsTS,              // Encoded Date+Time
  5229.       pDBIDATE       pdateD,            // Encoded Date
  5230.       pTIME          ptimeT             // Encoded Time
  5231.    );
  5232.  
  5233.  
  5234. DBIResult DBIFN DbiBcdFromFloat(      // Converts FLOAT number into FMTBcd format
  5235.        pDFLOAT     piVal   ,            // Float to convert
  5236.        UINT16      iPrecision,          // Precision of BCD
  5237.        UINT16      iPlaces ,            // Number of decimals
  5238.        pFMTBcd     pBcd                 // returns Bcd number (length = iPrecision +2)
  5239.     );
  5240.  
  5241. DBIResult DBIFN DbiBcdToFloat(        // Converts FMTBcd number to FLOAT
  5242.       pFMTBcd      pBcd,                // Bcd number to convert
  5243.       pDFLOAT      piVal                // Returns converted float
  5244.    );
  5245.  
  5246. //===========================================================================
  5247. //                           CallBacks
  5248. //===========================================================================
  5249.  
  5250. DBIResult DBIFN DbiRegisterCallBack ( // Register a call back fn
  5251.       hDBICur        hCursor,           // Cursor (Optional)
  5252.       CBType         ecbType,           // Type of call back
  5253.       UINT32         iClientData,       // Pass-thru client data
  5254.       UINT16         iCbBufLen,         // Callback buffer len
  5255.       pVOID          pCbBuf,            // Pointer to callback buffer
  5256.       pfDBICallBack  pfCb               // Call back fn being registered
  5257.    );
  5258.  
  5259. DBIResult DBIFN DbiGetCallBack (      // Register a call back fn
  5260.       hDBICur        hCursor,           // Cursor (Optional)
  5261.       CBType         ecbType,           // Type of call back
  5262.       pUINT32        piClientData,      // Pass-thru client data
  5263.       pUINT16        piCbBufLen,        // Callback buffer len
  5264.       ppVOID         ppCbBuf,           // Pointer to callback buffer
  5265.       ppfDBICallBack ppfCb              // Call back fn being registered
  5266.    );
  5267.  
  5268. //============================================================================
  5269. //                          Date, time formats
  5270. //============================================================================
  5271.  
  5272.  
  5273. DBIResult DBIFN DbiGetDateFormat (    // Get current date format
  5274.       pFMTDate       pfmtDate
  5275.    );
  5276.  
  5277. DBIResult DBIFN DbiSetDateFormat (    // Set current date format
  5278.       pFMTDate       pfmtDate
  5279.    );
  5280.  
  5281. DBIResult DBIFN DbiGetTimeFormat (    // Get current time format
  5282.       pFMTTime       pfmtTime
  5283.    );
  5284.  
  5285. DBIResult DBIFN DbiSetTimeFormat (    // Set current time format
  5286.       pFMTTime       pfmtTime
  5287.    );
  5288.  
  5289. DBIResult DBIFN DbiGetNumberFormat (  // Get current number format
  5290.       pFMTNumber     pfmtNumber
  5291.    );
  5292.  
  5293. DBIResult DBIFN DbiSetNumberFormat (  // Set current number format
  5294.       pFMTNumber     pfmtNumber
  5295.    );
  5296.  
  5297. //============================================================================
  5298. //                      Conversions
  5299. //============================================================================
  5300.  
  5301. DBIResult DBIFN DbiNativeToAnsi(      // Convert from native to Ansi
  5302.       pVOID    pLdObj  ,                // Language driver
  5303.       pCHAR    pAnsiStr,                // Destination buffer (opt)
  5304.       pCHAR    pNativeStr ,             // Source buffer
  5305.       UINT32   iLen    ,                // Length of buffer (opt)
  5306.       pBOOL    pbDataLoss               // Returns TRUE if conversion will loose data (opt)
  5307.    );
  5308.  
  5309. DBIResult DBIFN DbiAnsiToNative(      // Convert from Ansi to native
  5310.       pVOID pLdObj  ,                   // Language driver
  5311.       pCHAR    pNativeStr ,             // Destination buffer (opt)
  5312.       pCHAR    pAnsiStr,                // Source buffer
  5313.       UINT32   iLen    ,                // Length of buffer (opt)
  5314.       pBOOL    pbDataLoss               // Returns TRUE if conversion will loose data (opt)
  5315.    );
  5316.  
  5317. //============================================================================
  5318. //                            Filters
  5319. //============================================================================
  5320. #if !defined(MIDL)
  5321. DBIResult DBIFN DbiAddFilter(         // Add a filter to the cursor
  5322.       hDBICur           hCursor,        // Cursor handle
  5323.       UINT32            iClientData,    // Client supplied data      (opt)
  5324.       UINT16            iPriority,      // 1..N with 1 being highest (opt)
  5325.       BOOL              bCanAbort,      // TRUE if pfFiltercan return ABORT (opt)
  5326.       pCANExpr          pcanExpr,       // Expression tree        (opt)
  5327.       pfGENFilter       pfFilter,       // ptr to filter function (opt)
  5328.       phDBIFilter       phFilter        // Returns filter handle
  5329.    );
  5330. #endif // !defined(MIDL)
  5331.  
  5332. DBIResult DBIFN DbiDropFilter(        // Drop a filter
  5333.       hDBICur           hCursor,        // Cursor handle
  5334.       hDBIFilter        hFilter         // Filter handle
  5335.    );
  5336.  
  5337. DBIResult DBIFN DbiActivateFilter(    // Activate a Filter
  5338.       hDBICur           hCursor,        // Cursor handle
  5339.       hDBIFilter        hFilter         // Filter handle
  5340.    );
  5341.  
  5342. DBIResult DBIFN DbiDeactivateFilter(  // Deactivate Filter
  5343.       hDBICur           hCursor,        // Cursor handle
  5344.       hDBIFilter        hFilter         // Filter handle
  5345.    );
  5346.  
  5347. #if !defined(MIDL)
  5348. DBIResult DBIFN  DbiGetFilterInfo(    // Get filter information
  5349.       hDBICur           hCur    ,       // Cursor handle
  5350.       hDBIFilter        hFilter ,       // Filter handle          /NULL
  5351.       UINT16            iFilterId,      // Filter id              /0
  5352.       UINT16            iFilterSeqNo,   // Filter sequence number /0
  5353.       pFILTERInfo       pFilterinfo     // Returns filter info
  5354.   );
  5355. #endif // !defined(MIDL)
  5356.  
  5357. //============================================================================
  5358. //                            Linked Cursors
  5359. //============================================================================
  5360.  
  5361. DBIResult DBIFN DbiBeginLinkMode(     // Convert cursor to a link cursor
  5362.       phDBICur          phCursor        // In/Out : returns new cursor
  5363.     );
  5364.  
  5365. DBIResult DBIFN DbiEndLinkMode (      // Convert cursor back to normal cursor
  5366.       phDBICur       phCursor           // In/Out : returns original cursor
  5367.    );
  5368.  
  5369. DBIResult DBIFN DbiLinkDetail(        // Link detail to master
  5370.       hDBICur        hMstrCursor,       // Master cursor
  5371.       hDBICur        hDetlCursor,       // Detail cursor
  5372.       UINT16         iLnkFields,        // Number of link fields
  5373.       pUINT16        piMstrFields,      // Array of fields in master
  5374.       pUINT16        piDetlFields       // Array of fields in detail
  5375.     );
  5376.  
  5377. DBIResult DBIFN DbiLinkDetailToExp(   // Link detail to a master using exp
  5378.         hDBICur         hCursorMstr,    // Master cursor
  5379.         hDBICur         hCursorDetl,    // Detail cursor
  5380.         UINT16          iKeyLen,        // Key length to match
  5381.         pCHAR           pszMstrExp      // Expression string
  5382.     );
  5383.  
  5384. DBIResult DBIFN DbiUnlinkDetail (     // Unlink detail from master
  5385.       hDBICur        hDetlCursor        // Detail cursor to unlink
  5386.     );
  5387.  
  5388. DBIResult DBIFN DbiGetLinkStatus(     // Query linkage info for table
  5389.         hDBICur         hCursor,        // Cursor handle
  5390.         phDBICur        phCursorMstr,   // Returns master cursor, if any   (opt)
  5391.         phDBICur        phCursorDet,    // Returns first detail cursor, if any (opt)
  5392.         phDBICur        phCursorSib     // Returns next sibling detail cursor, if any (opt)
  5393.     );
  5394.  
  5395.  
  5396. //===========================================================================
  5397. //                            Translation
  5398. //===========================================================================
  5399.  
  5400.  
  5401. DBIResult DBIFN DbiTranslateRecordStructure ( // Translate a record
  5402.       pCHAR          pszSrcDriverType,  // Source driver type
  5403.       UINT16         iFlds,             // Number of fields
  5404.       pFLDDesc       pfldsSrc,          // Array of source fields: logical or physical types
  5405.       pCHAR          pszDstDriverType,  // Destination driver type
  5406.       pCHAR          pszLangDriver,     // Language driver for destination
  5407.       pFLDDesc       pfldsDst     ,     // Array of dest. fields returned
  5408.       BOOL           bCreatable         // TRUE -> map to creatable fields only.
  5409.    );
  5410.  
  5411. DBIResult DBIFN DbiOpenFieldXlt (     // Open translation object
  5412.       pCHAR          pszSrcTblType,     // NULL for Logical
  5413.       pCHAR          pszSrcLangDrv,     // NULL if no tranliteration
  5414.       pFLDDesc       pfldSrc,           // source field descriptor
  5415.       pCHAR          pszDestTblType,    // NULL for Logical
  5416.       pCHAR          pszDstLangDrv,     // NULL if no tranliteration
  5417.       pFLDDesc       pfldDest,          // Source field descriptor
  5418.       pBOOL          pbDataLoss,        // Set to TRUE, for data loss
  5419.       phDBIXlt       phXlt              // Returned translate handle
  5420.    );
  5421.  
  5422. DBIResult DBIFN DbiTranslateField (   // Translate a field
  5423.       hDBIXlt        hXlt,              // Translation handle
  5424.       pBYTE          pSrc,              // Source field
  5425.       pBYTE          pDest              // Destination field
  5426.    );
  5427.  
  5428. DBIResult DBIFN DbiCloseFieldXlt (    // Close translation object
  5429.       hDBIXlt        hXlt               // Translation handle
  5430.    );
  5431.  
  5432. //=========================================================================
  5433. //    Delayed Updates
  5434. //=========================================================================
  5435.  
  5436. DBIResult DBIFN DbiBeginDelayedUpdates(  // put cursor in delayed update mode
  5437.       phDBICur         phCursor          // In/Out : returns new Cursor
  5438.     );
  5439.  
  5440. DBIResult DBIFN DbiEndDelayedUpdates(  // Convert cursor back to normal cursor
  5441.       phDBICur         phCursor        // In/Out : returns original Cursor
  5442.     );
  5443.  
  5444. typedef enum                      // Op types for Delayed Update cursor
  5445.    {
  5446.       dbiDelayedUpdCommit          = 0,  // Commit the updates
  5447.       dbiDelayedUpdCancel          = 1,  // Rollback the updates
  5448.       dbiDelayedUpdCancelCurrent   = 2,  // Cancel the Current Rec Change.
  5449.       dbiDelayedUpdPrepare         = 3   // Phase1 of two Phase commit.
  5450.    }  DBIDelayedUpdCmd;
  5451.  
  5452. DBIResult DBIFN DbiApplyDelayedUpdates ( // Perform the specified operation.
  5453.     hDBICur            hCursor,          // Delayed update cursor handle
  5454.     DBIDelayedUpdCmd   eUpdCmd           // Op Type: Commit or Rollback.
  5455.     );
  5456.  
  5457. #define DBIDELAYUPD_SHOWMODIFYBIT      (0x1)    // Show only modified records.
  5458. #define DBIDELAYUPD_SHOWINSERTBIT      (0x2)    // Show only inserted records.
  5459. #define DBIDELAYUPD_SHOWDELETEBIT      (0x4)    // Show only deleted records.
  5460. #define DBIDELAYUPD_SHOWNONMODIFYBIT   (0x8)    // Show only unmodified recs.
  5461.  
  5462. //===========================================================================
  5463. //                                 MISC.
  5464. //===========================================================================
  5465.  
  5466.  
  5467. DBIResult DBIFN DbiGetTableOpenCount (   //  Get local cursor count
  5468.       hDBIDb         hDb,                    // Database
  5469.       pCHAR          pszTableName,           // Table name
  5470.       pCHAR          pszDriverType,          // Driver type /NULL
  5471.       pUINT16        piOpenCount             // returned number of cursors
  5472. );
  5473.  
  5474. DBIResult DBIFN DbiUseIdleTime (      // Use Idle time
  5475.       VOID
  5476.    );
  5477.  
  5478. DBIResult DBIFN DbiGetLdObj (         // Get language driver
  5479.       hDBICur        hCursor,           // Cursor handle
  5480.       pVOID         *ppLdObj            // Returned language driver object
  5481.    );
  5482.  
  5483. DBIResult DBIFN DbiGetLdName (        // Get language driver name from table
  5484.       pCHAR         pszDriver,          // Driver name
  5485.       pCHAR         pObjName,           // Name of object, i.e. table name
  5486.       pCHAR         pLdName             // Returned language driver name
  5487.    );
  5488.  
  5489. DBIResult DBIFN DbiFormFullName (     // Form Full Name
  5490.       hDBIDb         hDb,               // Database handle
  5491.       pCHAR          pszTableName,      // Table name
  5492.       pCHAR          pszDriverType,     // Driver type /NULL
  5493.       pCHAR          pszFullName        // Returns full name
  5494.    );
  5495.  
  5496. DBIResult DBIFN DbiAddPassword (      // Add a password to current session
  5497.       pCHAR          pszPassword        // Password
  5498.    );
  5499.  
  5500. DBIResult DBIFN DbiDropPassword (     // Drop a password from current session
  5501.       pCHAR          pszPassword        // password/NULL
  5502.    );
  5503.  
  5504. DBIResult DBIFN DbiGetNetUserName (   // Get network username
  5505.       pCHAR          pszNetUserName     // Returns username
  5506.    );
  5507.  
  5508.  
  5509. DBIResult DBIFN DbiDebugLayerOptions (// Get SDK debug layer options
  5510.       UINT16         iOption,           // Option
  5511.       pCHAR          pDebugFile         //
  5512.    );
  5513.  
  5514. DBIResult DBIFN DbiOpenCfgInfoList (  // Open a cursor on "Config"
  5515.       hDBICfg        hCfg,              // NULL
  5516.       DBIOpenMode    eOpenMode,         // ReadWrite or readonly
  5517.       CFGMode        eConfigMode,       // Config mode
  5518.       pCHAR          pszCfgPath,        // Path
  5519.       phDBICur       phCur              // Returned cursor
  5520.   );
  5521.  
  5522. DBIResult DBIFN DbiAddAlias (         // Add a new alias
  5523.       hDBICfg        hCfg,              // NULL
  5524.       pCHAR          pszAliasName,      // Alias name
  5525.       pCHAR          pszDriverType,     // Driver type for alias
  5526.       pCHAR          pszParams,         // Optional parameters
  5527.       BOOL           bPersist           // Persistent or session relative
  5528.   );
  5529.  
  5530. DBIResult DBIFN DbiDeleteAlias (      // Add a new alias
  5531.       hDBICfg        hCfg,              // NULL
  5532.       pCHAR          pszAliasName       // Alias name
  5533.   );
  5534.  
  5535.  
  5536.  
  5537. #ifndef NODBIQBE
  5538. //===========================================================================
  5539. //                      Query Management
  5540. //===========================================================================
  5541.  
  5542. DBIResult DBIFN DbiQExecDirect (      // Execute query
  5543.       hDBIDb         hDb,               // Database handle
  5544.       DBIQryLang     eQryLang,          // Query language
  5545.       pCHAR          pszQuery,          // Query
  5546.       phDBICur       phCur              // Returned cursor on result set
  5547.    );
  5548.  
  5549. DBIResult DBIFN DbiQAlloc (         // Allocates a statement handle
  5550.       hDBIDb         hDb,               // Database handle
  5551.       DBIQryLang     eQryLang,          // Query language
  5552.       phDBIStmt      phStmt             // Returned statment handle
  5553.    );
  5554.  
  5555.  
  5556. DBIResult DBIFN DbiQPrepare (         // Prepare a query
  5557.       hDBIStmt       hStmt,             // Statment handle
  5558.       pCHAR          pszQuery           // Query
  5559.    );
  5560.  
  5561. DBIResult DBIFN DbiQPrepareExt (      // Prepare a query
  5562.       hDBIDb         hDb,               // Database handle
  5563.       DBIQryLang     eQryLang,          // Query language
  5564.       pCHAR          pszQuery,          // Query
  5565.       UINT16         propBits,          // properties for Prepare, e.g. qprepFORUPDATE
  5566.       phDBIStmt      phStmt             // Returned statment handle
  5567.    );
  5568.  
  5569. DBIResult DBIFN DbiQExec (            // Execute prepared query
  5570.       hDBIStmt       hStmt,             // Statement handle
  5571.       phDBICur       phCur              // Returned handle on result set
  5572.    );
  5573.  
  5574. DBIResult DBIFN DbiQFree (            // Free statement handle
  5575.       phDBIStmt      phStmt             // Statement handle
  5576.    );
  5577.  
  5578. DBIResult DBIFN DbiQSetParams (       // Set query options
  5579.       hDBIStmt       hStmt,             // Statement handle
  5580.       UINT16         uFldDescs,         // Number of parameter field descriptors
  5581.       pFLDDesc       paFldDescs,        // Array of parameter field descriptors
  5582.       pBYTE          pRecBuff           // Record buffer
  5583.    );
  5584.  
  5585. DBIResult DBIFN DbiQInstantiateAnswer ( // Create answer table
  5586.       hDBIStmt   hStmt,                 // Statement Handle
  5587.       hDBICur    hCur,                  // Cursor Handle
  5588.       pCHAR      pszAnswerName,         // Answer Table Name/NULL
  5589.       pCHAR      pszAnswerType,         // Answer Table Type/NULL
  5590.       BOOL       bOverWrite,            // Overwrite Flag
  5591.       phDBICur   phCur                  // cursor to instantiated table (output)(optional)
  5592.    );
  5593.  
  5594. DBIResult DBIFN DbiQExecProcDirect (    // Direct execution of stored procedure
  5595.       hDBIDb         hDb,               // Database handle
  5596.       pCHAR          pszProc,           // Stored procedure name
  5597.       UINT16         uParamDescs,       // Number of parameter descriptors
  5598.       pSPParamDesc   paParamDescs,      // Array of parameter descriptors
  5599.       pBYTE          pRecBuff,          // Record buffer
  5600.       phDBICur       phCur              // Returned handle on result set
  5601.    );
  5602.  
  5603. DBIResult DBIFN DbiQPrepareProc (       // Prepare a stored procedure
  5604.       hDBIDb         hDb,               // Database handle
  5605.       pCHAR          pszProc,           // Stored procedure name
  5606.       UINT16         uParamDescs,       // Number of parameter descriptors
  5607.       pSPParamDesc   paParamDescs,      // Array of parameter descriptors
  5608.       pBYTE          pRecBuff,          // Record buffer
  5609.       phDBIStmt      phStmt             // Returned statment handle
  5610.    );
  5611.  
  5612. DBIResult DBIFN DbiQSetProcParams (     // Set procedure params
  5613.       hDBIStmt       hStmt,             // Statement handle
  5614.       UINT16         uParamDescs,       // Number of parameter descriptors
  5615.       pSPParamDesc   paParamDescs,      // Array of parameter descriptors
  5616.       pBYTE          pRecBuff           // Record buffer
  5617.    );
  5618.  
  5619. typedef struct
  5620.    {
  5621.       DBINAME     szDatabase;
  5622.       DBITBLNAME  szTableName;
  5623.       DBINAME     szFieldName;
  5624.       BOOL        bExpression;
  5625.       BOOL        bAggregate;
  5626.       BOOL        bConstant;
  5627.    }  STMTBaseDesc;
  5628. typedef STMTBaseDesc far *pSTMTBaseDesc;
  5629.  
  5630. DBIResult DBIFN DbiQGetBaseDescs(
  5631.       hDBIStmt     hStmt,      // Statement Handle
  5632.       phDBICur     phCur       // Cursor of type StatementBaseDesc
  5633.       );
  5634.  
  5635. #endif  // NODBIQBE
  5636.  
  5637. #endif  // NODBIPROTOTYPES
  5638.  
  5639. #ifdef __cplusplus
  5640.    }
  5641. #endif // __cplusplus
  5642.  
  5643. #if ! (defined(lint) || defined(_lint))
  5644. #  if ( _MSC_VER >= 800 ) || (defined(__BORLANDC__) && defined(__FLAT__))
  5645. #    pragma warning(disable:4103)
  5646. #    if !(defined( MIDL_PASS )) || defined( __midl )
  5647. #      pragma pack(pop)
  5648. #    else
  5649. #      pragma pack()
  5650. #    endif
  5651. #  elif defined(__BORLANDC__) && !defined(__FLAT__)
  5652. #    pragma option -a.
  5653. #  else
  5654. #    pragma pack()
  5655. #  endif
  5656. #endif // ! (defined(lint) || defined(_lint))
  5657.  
  5658. #endif
  5659.