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

📄 bde.int

📁 Delphi7官方文档-英文 对于英文好的delphi程序员来说 这个是你的至宝!
💻 INT
📖 第 1 页 / 共 5 页
字号:

{*******************************************************}
{                                                       }
{       Borland Delphi Visual Component Library         }
{       BDE Interface Unit                              }
{                                                       }
{       Copyright (c) 1995,99 Inprise Corporation       }
{                                                       }
{*******************************************************}

unit BDE;

{$Z+}

interface

uses Windows;

{ Translated from IDAPI.H,  Revision 4.203 }

const
  DBIINTFVER         = 500;             { Version of the interface }
  DBIENGVERSION      = 500;             { Version of the engine }

{-----------------------------------------------------------------------}
{     DBI types                                                         }
{-----------------------------------------------------------------------}


{ sdk debug layer defines }

const
  DEBUGON            = $1;
  OUTPUTTOFILE       = $2;
  FLUSHEVERYOP       = $8;
  APPENDTOLOG        = $10;

{ Constants }

  DBIMAXNAMELEN      = 31;              { Name limit (table, field etc) }
  DBIMAXSPNAMELEN    = 64;              { Max stored procedure name length }
  DBIMAXFUNCNAMELEN  = 255;             { Max function name len }
  DBIMAXFLDSINKEY    = 16;              { Max fields in a key }
  DBIMAXKEYEXPLEN    = 220;             { Max Key expression length }
  DBIMAXEXTLEN       = 3;               { Max file extension len, not incl. dot (excluding zero termination) }
  DBIMAXTBLNAMELEN   = 260;             { Max table name length }
  DBIMAXDRIVELEN     = 127;             { Max drive length }
  DBIMAXPATHLEN      = 260;             { Max path+file name len (excluding zero termination) }
  DBIMAXMSGLEN       = 127;             { Max message len }
  DBIMAXVCHKLEN      = 255;             { Max val check len }
  DBIMAXPICTLEN      = 175;             { Max picture len }
  DBIMAXFLDSINSEC    = 256;             { Max fields in security spec }

  DBIMAXSCFIELDS     = 40;              { max nbr of fields in a config section }
  DBIMAXSCFLDLEN     = 128;             { max field length }
  DBIMAXSCRECSIZE    = DBIMAXSCFIELDS*DBIMAXSCFLDLEN; { max rec size }

  DBIMAXUSERNAMELEN  = 14;              { Max user name (general) }
  DBIMAXXBUSERNAMELEN = 16;             { Max user name length (xBASE) }
  DBIMAXBOOKMARKLEN  = 4104;            { Max Bookmark length }

  DBIMAXTRACELEN     = 8192;            { Max trace msg len }

  DBIMAXTYPEDESC     = 127;             { Max Type Description size }
  DBIMAXDRSQLSTR     = 8192;            { Max Size of SQL Constraint }

  DBIMAXOLEDBNAMELEN = 64;              { Max OLE DB name length }

{============================================================================}
{                             G e n e r a l                                  }
{============================================================================}

type
  DBIDATE            = Longint;
  TIME               = Longint;
  TIMESTAMP          = Double;
  DBIResult          = Word;         { Function result }
  TypedEnum          = Integer;
  PLocale            = Pointer;

{ Handle Types }

  _hDBIObj           = record end;      { Dummy structure to create "typed" handles }
  hDBIObj            = ^_hDBIObj;       { Generic object handle }
  hDBIDb             = ^_hDBIObj;       { Database handle }
  hDBIQry            = ^_hDBIObj;       { Query handle }
  hDBIStmt           = ^_hDBIObj;       { Statement handle ("new query") }
  hDBICur            = ^_hDBIObj;       { Cursor handle }
  hDBISes            = ^_hDBIObj;       { Session handle }
  hDBIXlt            = ^_hDBIObj;       { Translation handle }
  hDBICfg            = ^_hDBIObj;       { Configuration handle }
  hDBIXact           = ^_hDBIObj;       { Transaction handle }
  hDBIFilter         = ^_hDBIObj;       { Filter handle }
  hDBIDR             = ^_hDBIObj;       { Handle to a Client Data Repository (CDR) Object }


{ Handle Pointers }

  phDBIObj           = ^hDBIObj;        { Pointer to Generic object handle }
  phDBIDb            = ^hDBIDb;         { Pointer to Database handle }
  phDBIQry           = ^hDBIQry;        { Pointer to Query handle }
  phDBIStmt          = ^hDBIStmt;       { Pointer to Statement handle }
  phDBICur           = ^hDBICur;        { Pointer to Cursor handle }
  phDBISes           = ^hDBISes;        { Pointer to Session handle }
  phDBIXlt           = ^hDBIXlt;        { Pointer to Translation handle }
  phDBICfg           = ^hDBICfg;        { Pointer to Configuration handle }
  phDBIXact          = ^hDBIXact;       { Pointer to Transaction handle }
  phDBIFilter        = ^hDBIFilter;     { Pointer to Filter handle }
  phDBIDR            = ^hDBIDR;         { Pointer to CDR Handle }

{ typedefs for buffers of various common sizes: }

  DBIPATH            = packed array [0..DBIMAXPATHLEN] of Char; { holds a DOS path }
  DBINAME            = packed array [0..DBIMAXNAMELEN] of Char; { holds a name }
  DBIEXT             = packed array [0..DBIMAXEXTLEN] of Char; { holds an extension EXT }
  DBIDOTEXT          = packed array [0..DBIMAXEXTLEN+1] of Char; { holds an extension EXT including '.' }
  DBIDRIVE           = packed array [0..DBIMAXDRIVELEN] of Char; { holds a drive name }
  DBITBLNAME         = packed array [0..DBIMAXTBLNAMELEN] of Char; { holds a table name }
  DBISPNAME          = packed array [0..DBIMAXSPNAMELEN] of Char; { holds a stored procedure name }
  DBIUSERNAME        = packed array [0..DBIMAXUSERNAMELEN] of Char; { holds a user name }
  DBIKEY             = packed array [0..DBIMAXFLDSINKEY-1] of Word; { holds list of fields in a key }
  DBIKEYEXP          = packed array [0..DBIMAXKEYEXPLEN] of Char; { holds a key expression }
  DBIVCHK            = packed array [0..DBIMAXVCHKLEN] of Byte; { holds a validity check }
  DBIPICT            = packed array [0..DBIMAXPICTLEN] of Char; { holds a picture (Pdox) }
  DBIMSG             = packed array [0..DBIMAXMSGLEN] of Char; { holds an error message }
  DBIDRTYPEDESC      = packed array [0..DBIMAXTYPEDESC] of Char; { holds a Type Description string }
  DBISQLSTR          = packed array [0..DBIMAXDRSQLSTR] of Char; { a SQL string }


{============================================================================}
{                             Environmental                                  }
{============================================================================}

type
  pDBIEnv = ^DBIEnv;
  DBIEnv = packed record                { Struct for defining the environ. }
    szWorkDir       : DBIPATH;          { Working directory }
    szIniFile       : DBIPATH;          { Configuration file }
    bForceLocalInit : WordBool;         { Force local initialization }
    szLang          : DBINAME;          { System language driver }
    szClientName    : DBINAME;          { Client name (documentary) }
  end;

{============================================================================}
{                   System Info                                              }
{============================================================================}

type
  pSYSVersion = ^SYSVersion;
  SYSVersion = packed record            { System Version Info }
    iVersion        : Word;             { Engine version }
    iIntfLevel      : Word;             { Client Interface level }
    dateVer         : DBIDATE;          { Version date (Compile/Release) }
    timeVer         : Time;             { Version time (Compile/Release) }
    szVersion       : array [0..19] of Char; { Version name (xxx.xxx.xxx.xxx) }
  end;

  pSYSConfig = ^SYSConfig;
  SYSConfig = packed record             { System configuration (basic) }
    bLocalShare     : WordBool;         { If Local files will be shared }
    iNetProtocol    : Word;             { Net Protocol (35, 40 etc.) }
    bNetShare       : WordBool;         { If Net files will be shared }
    szNetType       : DBINAME;          { Network type }
    szUserName      : DBIUSERNAME;      { Network user name }
    szIniFile       : DBIPATH;          { Configuration file }
    szLangDriver    : DBINAME;          { System language driver }
  end;

  pSYSInfo = ^SYSInfo;
  SYSInfo = packed record               { System Status/Info }
    iBufferSpace    : Word;             { in K }
    iHeapSpace      : Word;             { in K }
    iDrivers        : Word;             { Active/Loaded drivers }
    iClients        : Word;             { Active clients }
    iSessions       : Word;             { Number of sessions (For all clients) }
    iDatabases      : Word;             { Open databases }
    iCursors        : Word;             { Number of cursors }
  end;

  pCLIENTInfo = ^CLIENTInfo;
  CLIENTInfo = packed record
    szName          : DBINAME;          { Documentary name }
    iSessions       : Word;             { Number of sessions }
    szWorkDir       : DBIPATH;          { Working directory }
    szLang          : DBINAME;          { System language driver (Client supplied) }
  end;

  pSESInfo = ^SESInfo;
  SESInfo = packed record
    iSession        : Word;             { Session id (1..n) }
    szName          : DBINAME;          { Documentary name }
    iDatabases      : Word;             { Open databases }
    iCursors        : Word;             { Open cursors }
    iLockWait       : SmallInt;         { Lock wait time (in seconds) }
    szNetDir        : DBIPATH;          { Net directory location }
    szPrivDir       : DBIPATH;          { Current Private directory }
  end;

{============================================================================}
{                             Table / Field Types                            }
{============================================================================}

{ Driver Types }

const
  szPARADOX          = 'PARADOX';
  szDBASE            = 'DBASE';
  szFOXPRO           = 'FOXPRO';
  szASCII            = 'ASCIIDRV';
  szOLEDB            = 'OLEDBDRV';
  szMSACCESS         = 'MSACCESS'; 


{ Field Types (Logical) }

  fldUNKNOWN         = 0;
  fldZSTRING         = 1;               { Null terminated string }
  fldDATE            = 2;               { Date     (32 bit) }
  fldBLOB            = 3;               { Blob }
  fldBOOL            = 4;               { Boolean  (16 bit) }
  fldINT16           = 5;               { 16 bit signed number }
  fldINT32           = 6;               { 32 bit signed number }
  fldFLOAT           = 7;               { 64 bit floating point }
  fldBCD             = 8;               { BCD }
  fldBYTES           = 9;               { Fixed number of bytes }
  fldTIME            = 10;              { Time        (32 bit) }
  fldTIMESTAMP       = 11;              { Time-stamp  (64 bit) }
  fldUINT16          = 12;              { Unsigned 16 bit integer }
  fldUINT32          = 13;              { Unsigned 32 bit integer }
  fldFLOATIEEE       = 14;              { 80-bit IEEE float }
  fldVARBYTES        = 15;              { Length prefixed var bytes }
  fldLOCKINFO        = 16;              { Look for LOCKINFO typedef }
  fldCURSOR          = 17;              { For Oracle Cursor type }
  fldINT64           = 18;              { 64 bit signed number }
  fldUINT64          = 19;              { Unsigned 64 bit integer }
  fldADT             = 20;              { Abstract datatype (structure) }
  fldARRAY           = 21;              { Array field type }
  fldREF             = 22;              { Reference to ADT }
  fldTABLE           = 23;              { Nested table (reference) }

  fldDATETIME        = 24;              { DateTime structure field }

  MAXLOGFLDTYPES     = 25;              { Number of logical fieldtypes }

{ Sub Types (Logical) }

{ fldFLOAT subtype }

  fldstMONEY         = 21;              { Money }

{ fldBLOB subtypes }

  fldstMEMO          = 22;              { Text Memo }
  fldstBINARY        = 23;              { Binary data }
  fldstFMTMEMO       = 24;              { Formatted Text }
  fldstOLEOBJ        = 25;              { OLE object (Paradox) }
  fldstGRAPHIC       = 26;              { Graphics object }
  fldstDBSOLEOBJ     = 27;              { dBASE OLE object }
  fldstTYPEDBINARY   = 28;              { Typed Binary data }
  fldstACCOLEOBJ     = 30;              { Access OLE object }
  fldstHMEMO         = 33;              { CLOB }
  fldstHBINARY       = 34;              { BLOB }
  fldstBFILE         = 36;              { BFILE }

{ fldZSTRING subtype }

  fldstPASSWORD      = 1;               { Password }

⌨️ 快捷键说明

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