⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 idapi.h

📁 在Visual C++访问Borland数据库引擎(BDE)
💻 H
📖 第 1 页 / 共 5 页
字号:
typedef SYSVersion far *pSYSVersion;

typedef struct                         // System configuration (basic)
   {
      BOOL16         bLocalShare;         // If Local files will be shared
      UINT16         iNetProtocol;        // Net Protocol (35, 40 etc.)
      BOOL16         bNetShare;           // If Net files will be shared
      DBINAME        szNetType;           // Network type
      DBIUSERNAME    szUserName;          // Network user name
      DBIPATH        szIniFile;           // Configuration file
      DBINAME        szLangDriver;        // System language driver
   } SYSConfig;
typedef SYSConfig far *pSYSConfig;

typedef struct                         // System Status/Info
   {
      UINT16         iBufferSpace;           // in K
      UINT16         iHeapSpace;             // in K
      UINT16         iDrivers;               // Active/Loaded drivers
      UINT16         iClients;               // Active clients
      UINT16         iSessions;              // Number of sessions (For all clients)
      UINT16         iDatabases;             // Open databases
      UINT16         iCursors;               // Number of cursors
   } SYSInfo;
typedef SYSInfo far * pSYSInfo;

typedef struct
   {
      DBINAME        szName;                 // Documentary name
      UINT16         iSessions;              // Number of sessions
      DBIPATH        szWorkDir;              // Working directory
      DBINAME        szLang;                 // System language driver (Client supplied)
   } CLIENTInfo;
typedef CLIENTInfo far * pCLIENTInfo;

typedef struct
   {
      UINT16         iSession;               // Session id (1..n)
      DBINAME        szName;                 // Documentary name
      UINT16         iDatabases;             // Open databases
      UINT16         iCursors;               // Open cursors
      INT16          iLockWait;              // Lock wait time (in seconds)
      DBIPATH        szNetDir;               // Net directory location
      DBIPATH        szPrivDir;              // Current Private directory
   } SESInfo;
typedef SESInfo far * pSESInfo;

//============================================================================
//                             Table / Field Types
//============================================================================

// Driver Types

#define szPARADOX       "PARADOX"
#define szDBASE         "DBASE"
#define szASCII         "ASCIIDRV"


// Field Types (Logical)

#define fldUNKNOWN      0
#define fldZSTRING      1                 // Null terminated string
#define fldDATE         2                 // Date     (32 bit)
#define fldBLOB         3                 // Blob
#define fldBOOL         4                 // Boolean  (16 bit)
#define fldINT16        5                 // 16 bit signed number
#define fldINT32        6                 // 32 bit signed number
#define fldFLOAT        7                 // 64 bit floating point
#define fldBCD          8                 // BCD
#define fldBYTES        9                 // Fixed number of bytes
#define fldTIME         10                // Time        (32 bit)
#define fldTIMESTAMP    11                // Time-stamp  (64 bit)
#define fldUINT16       12                // Unsigned 16 bit integer
#define fldUINT32       13                // Unsigned 32 bit integer
#define fldFLOATIEEE    14                // 80-bit IEEE float
#define fldVARBYTES     15                // Length prefixed var bytes
#define fldLOCKINFO     16                // Look for LOCKINFO typedef

#define MAXLOGFLDTYPES  17                // Number of logical fieldtypes

// Sub Types (Logical)

// fldFLOAT subtype

#define fldstMONEY      21                // Money

// fldBLOB subtypes

#define fldstMEMO          22             // Text Memo
#define fldstBINARY        23             // Binary data
#define fldstFMTMEMO       24             // Formatted Text
#define fldstOLEOBJ        25             // OLE object (Paradox)
#define fldstGRAPHIC       26             // Graphics object
#define fldstDBSOLEOBJ     27             // dBASE OLE object
#define fldstTYPEDBINARY   28             // Typed Binary data

// fldZSTRING subtype

#define fldstPASSWORD      1              // Password

// fldINT32 subtype

#define  fldstAUTOINC      29

// Paradox types (Physical)

#define  fldPDXCHAR        0x101        // Alpha    (string)
#define  fldPDXNUM         0x102        // Numeric
#define  fldPDXMONEY       0x103        // Money
#define  fldPDXDATE        0x104        // Date
#define  fldPDXSHORT       0x105        // Short
#define  fldPDXMEMO        0x106        // Text Memo       (blob)
#define  fldPDXBINARYBLOB  0x107        // Binary data     (blob)
#define  fldPDXFMTMEMO     0x108        // Formatted text  (blob)
#define  fldPDXOLEBLOB     0x109        // OLE object      (blob)
#define  fldPDXGRAPHIC     0x10A        // Graphics object (blob)
#define  fldPDXBLOB        fldPDXMEMO
#define  fldPDXLONG        0x10B        // Long
#define  fldPDXTIME        0x10C        // Time
#define  fldPDXDATETIME    0x10D        // Time Stamp
#define  fldPDXBOOL        0x10E        // Logical
#define  fldPDXAUTOINC     0x10F        // Auto increment (long)
#define  fldPDXBYTES       0x110        // Fixed number of bytes
#define  fldPDXBCD         0x111        // BCD (32 digits)
#define  fldPDXUNICHAR     0x112        // not supported yet

// xBASE types (Physical)

#define  fldDBCHAR         0x201        // Char string
#define  fldDBNUM          0x202        // Number
#define  fldDBMEMO         0x203        // Memo          (blob)
#define  fldDBBOOL         0x204        // Logical
#define  fldDBDATE         0x205        // Date
#define  fldDBFLOAT        0x206        // Float
#define  fldDBLOCK         0x207        // Logical type is LOCKINFO
#define  fldDBOLEBLOB      0x208        // OLE object    (blob)
#define  fldDBBINARY       0x209        // Binary data   (blob)
#define  fldDBBYTES        0x20A        // Only for TEMPORARY tables

// xBASE key types (Cannot be used as field types)

#define  fldDBKEYNUM       0x210
#define  fldDBKEYBCD       0x211


// Ascii types (Physical)

#define  fldASCCHAR         0x301       // Char string
#define  fldASCNUM          0x302       // Number
#define  fldASCBOOL         0x303       // Logical
#define  fldASCDATE         0x304       // Date
#define  fldASCFLOAT        0x305       // Float
#define  fldASCLOCK         0x306       // Not used
#define  fldASCTIMESTAMP    0x307       // TimeStamp
#define  fldASCTIME         0x308       // Time
#define  fldASCLONG         0x309       // Long
#define  fldASCMONEY        0x30A       // Money


//============================================================================
//                    Field descriptor
//============================================================================


typedef enum                              // Field Val Check type
   {
      fldvNOCHECKS     = 0,                  // Does not have explicit val checks
      fldvHASCHECKS    = 1,                  // One or more val checks on the field
      fldvUNKNOWN      = 2                   // Dont know at this time
   } FLDVchk;

typedef enum                              // Field Rights
   {
      fldrREADWRITE     = 0,                 // Field can be Read/Written
      fldrREADONLY      = 1,                 // Field is Read only
      fldrNONE          = 2,                 // No Rights on this field
      fldrUNKNOWN       = 3                  // Dont know at this time
   } FLDRights;

typedef struct {                          // Field Descriptor
      UINT16         iFldNum;                // Field number (1..n)
      DBINAME        szName;                 // Field name
      UINT16         iFldType;               // Field type
      UINT16         iSubType;               // Field subtype (if applicable)
      INT16          iUnits1;                // Number of Chars, digits etc
      INT16          iUnits2;                // Decimal places etc.
      UINT16         iOffset;                // Offset in the record (computed)
      UINT16         iLen;                   // Length in bytes (computed)
      UINT16         iNullOffset;            // For Null bits (computed)
      FLDVchk        efldvVchk;              // Field Has vcheck (computed)
      FLDRights      efldrRights;            // Field Rights (computed)
      BOOL16         bCalcField;             // Is Calculated field (computed)
      UINT16         iUnUsed[2];
   } FLDDesc;
typedef FLDDesc far *pFLDDesc;

//============================================================================
//                    Index descriptor
//============================================================================


typedef struct                            // Index description
   {
      DBITBLNAME     szName;                 // Index name
      UINT16         iIndexId;               // Index number
      DBINAME        szTagName;              // Tag name (for dBASE)
      DBINAME        szFormat;               // Optional format (BTREE, HASH etc)
      BOOL16         bPrimary;               // True, if primary index
      BOOL16         bUnique;                // True, if unique keys
      BOOL16         bDescending;            // True, for descending index
      BOOL16         bMaintained;            // True, if maintained index
      BOOL16         bSubset;                // True, if subset index
      BOOL16         bExpIdx;                // True, if expression index
      UINT16         iCost;                  // Not used
      UINT16         iFldsInKey;             // Fields in the key (1 for Exp)
      UINT16         iKeyLen;                // Phy Key length in bytes (Key only)
      BOOL16         bOutofDate;             // True, if index out of date
      UINT16         iKeyExpType;            // Key type of Expression
      DBIKEY         aiKeyFld;               // Array of field numbers in key
      DBIKEYEXP      szKeyExp;               // Key expression
      DBIKEYEXP      szKeyCond;              // Subset condition
      BOOL16         bCaseInsensitive;       // True, if case insensitive index
      UINT16         iBlockSize;             // Block size in bytes
      UINT16         iRestrNum;              // Restructure number
      BOOL16         abDescending[DBIMAXFLDSINKEY];   // TRUE
      UINT16         iUnUsed[16];
   } IDXDesc;
typedef IDXDesc far *pIDXDesc;

//============================================================================
//                    Validity check, Referential integrity descriptors
//============================================================================



// Subtypes for Lookup

typedef enum                              // Paradox Lookup type
   {
      lkupNONE          = 0,                 // Has no lookup
      lkupPRIVATE       = 1,                 // Just Current Field + Private
      lkupALLCORRESP    = 2,                 // All Corresponding + No Help
      lkupHELP          = 3,                 // Just Current Fld + Help and Fill
      lkupALLCORRESPHELP= 4                  // All Corresponging + Help
   } LKUPType;

#define TODAYVAL   2                       // for Min/Max/Def val flags
#define NOWVAL     3                       // for Min/Max/Def val flags

   // In VCHKDesc below, if any of bHasMinVal/bHasMaxVal/bHasDefVal
   // = TODAYVAL, then TODAY is assumed , = NOWVAL, then current time/today is assumed

typedef struct                            // Val Check structure
   {
      UINT16         iFldNum;                // Field number
      BOOL16         bRequired;              // If True, value is required
      BOOL16         bHasMinVal;             // If True, has min value
      BOOL16         bHasMaxVal;             // If True, has max value
      BOOL16         bHasDefVal;             // If True, has default value
      DBIVCHK        aMinVal;                // Min Value
      DBIVCHK        aMaxVal;                // Max Value
      DBIVCHK        aDefVal;                // Default value
      DBIPICT        szPict;                 // Picture string
      LKUPType       elkupType;              // Lookup/Fill type
      DBIPATH        szLkupTblName;          // Lookup Table name
   } VCHKDesc;
typedef VCHKDesc far *pVCHKDesc;

typedef enum                              // Ref integrity type
   {
      rintMASTER     = 0,                    // This table is Master
      rintDEPENDENT  = 1                     // This table is Dependent
   } RINTType;

typedef enum                              // Ref integrity action/qualifier
   {
      rintRESTRICT   = 0,                    // Prohibit operation
      rintCASCADE    = 1                     // Cascade operation
   } RINTQual;

typedef struct                            // Ref Integrity Desc
   {
      UINT16         iRintNum;               // Ref integrity number
      DBINAME        szRintName;             // A name to tag this integegrity constraint
      RINTType       eType;                  // Whether master/dependent
      DBIPATH        szTblName;              // Other table name
      RINTQual       eModOp;                 // Modify qualifier
      RINTQual       eDelOp;                 // Delete qualifier
      UINT16         iFldCount;              // Fields in foreign key
      DBIKEY         aiThisTabFld;           // Fields in this table

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -