📄 hbintf.pas
字号:
{*******************************************************}
{ }
{ Vladimir Gaitanoff HyperBase }
{ }
{ Interfaces definitions }
{ }
{ Copyright (c) 1997,99 Vladimir Gaitanoff }
{ }
{*******************************************************}
{$I HB.INC}
{$D-,L-}
unit hbIntf;
{$MINENUMSIZE 4}
interface
uses Windows, ActiveX,Variants;
const
{ Record attributes }
dsRecUnmodified = $0000; { Unmodified record }
dsRecOrg = $0001; { Original record (was changed) }
dsRecDeleted = $0002; { Record was deleted }
dsRecNew = $0004; { Record was inserted }
dsRecModified = $0008; { Record was changed }
dsRecModified2 = $0010; { Record was changed in delta }
dsUnused = $0020; { Record not used anymore (hole) }
dsDetUpd = $0040; { Detail modification Ins/Del/Mod. }
{ Can be combined with other status. }
dsIsNotVisible = dsRecDeleted or dsRecOrg or dsUnused;
dsIsVisible = not (dsRecDeleted or dsRecOrg or dsUnused);
dsIsModified = dsRecNew or dsRecModified or dsRecDeleted;
dsIsModified2 = dsIsModified or dsRecModified2;
{ Field attributes }
fldAttrHIDDEN = $0001; { Field is hidden }
fldAttrREADONLY = $0002; { Field is readonly }
fldAttrREQUIRED = $0004; { Field value required }
fldAttrLINK = $0008; { Linking field }
NOT_BLANK = 0; { Not null }
BLANK_NULL = 1; { 'real' NULL }
BLANK_NOTCHANGED = 2; { Not changed , compared to original value }
MAXKEYFIELDS = 16;
MAXMSGLEN = 127;
{ Field Types (Logical) - Originally from BDE.PAS }
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) }
MAXLOGFLDTYPES = 24; { Number of logical fieldtypes }
{ Additional fieldtypes }
fldINT8 = $1001;
fldUINT8 = $1002;
fldBOOL8 = $1003;
fldBOOL16 = fldBOOL;
fldBOOL32 = $1004;
fldUNICODE = $1007;
{ 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 }
fldstFIXED = 31; { CHAR type }
fldstUNICODE = 32; { Unicode }
fldstGUID = 38; { GUID }
{ fldINT32 subtype }
fldstAUTOINC = 29;
fldstUNKNOWN = 255;
{ Max iUnits1 is 255, but could be preceeded by 2 bytes length (mssql varbytes) }
MAXFIELDLEN = 258;
{ Master Detail flags }
mdNONE = $0000;
mdMASTER = $0001;
mdDETAIL = $0002;
mdMD = mdMASTER and mdDETAIL; { mdMASTER | mdDETAIL }
{ Master Detail Semantics DSBase.SetProp(dspropMD_SEMANTICS, Value) }
mdCASCADEDEL = $0004;
mdCASCADEMOD = $0008; { Allow master link field to be changed (cascade change to details) }
mdALLOWLINKCHANGE = $0010; { Allow detail linkfields to be changed (fly-away) }
{ Native Types }
type
DBResult = Word;
DBSearchCond = ( { Search condition for keys }
keySEARCHEQ, { = }
keySEARCHGT, { > }
keySEARCHGEQ { >= }
);
TDataPacket = PSafeArray;
pDSAttr = ^DSAttr;
DSAttr = type Byte;
phDSFilter = ^hDSFilter;
hDSFilter = type Pointer;
GROUPSTATE = (
grSTATEMIDDLE, { Record is neither the first or the last in the group }
grSTATEFIRST, { Record is the first in the group }
grSTATELAST, { Record is the last in the group }
grSTATEFIRSTLAST
);
phDSAggregate = ^hDSAggregate;
hDSAggregate = type Integer;
AGGSTATE = (
aggSTATEUNDEF, { State is undefined. Needs recalc. }
aggSTATEOK,
aggSTATEBLANK, { This is a blank value }
aggSTATEERROR { An error occurred previously }
);
AGGVALUE = packed record
iCnt : Integer; { Count of records in each }
eAggState : AGGSTATE; { State of value }
Value : record end; { First byte of value }
end;
pDSBOOKMRK = ^DSBOOKMRK;
DSBOOKMRK = packed record
iPos : Integer; { Position in given order }
iState : Integer; { State of cursor }
iRecNo : Integer; { Record number }
iSeqNo : Integer; { Version number of order }
iOrderID : Integer; { Defines Order }
end;
pSAVEPOINT = ^SAVEPOINT;
SAVEPOINT = type Integer;
DSKEY = packed array[0..MAXKEYFIELDS-1] of Integer;
DSKEYBOOL = packed array[0..MAXKEYFIELDS-1] of Bool;
MIDASNAME = packed array [0..31] of Char; { holds a name }
MIDASPATH = packed array [0..260] of Char; { holds a DOS path }
{ Dataset and Cursor Properties }
DSProp = (
dspropLOGCHANGES, { rw BOOL, Log changes for undo/delta }
dspropREADONLY, { rw BOOL, Disable dataset updates }
dspropNOOFCHANGES, { r UINT32, Number of changes }
dspropCONSTRAINTS_DISABLED, { rw BOOL, Disable constraints }
dspropDSISPARTIAL, { rw BOOL, Dataset is parital }
dspropRECORDSINDS, { r UINT32, Records in dataset }
dspropAUTOINC_DISABLED, { rw BOOL, Autoinc disabled }
dspropISDELTA, { r BOOL, Dataset is a delta }
dspropDONTINCLMETADATA, { rw BOOL, Exclude metadata in StreamDS }
dspropINCLBLOBSINDELTA, { rw UINT32, include blobs with lengths <= than }
{ this value in delta for 'original' record }
dspropGETSAVEPOINT, { r SAVEPOINT, return savepoint for current update state. }
dspropCOMPRESSARRAYS, { rw BOOL(TRUE), if true expands fielddescriptors for arrays }
dspropMD_SEMANTICS, { rw UINT32(0), Master/detail semantics }
dspropFIELD_FULLNAME, { r in: UINT32 (FieldID), out: zstring (full name) }
dspropFIELDID_FORNAME, { r in: zstring(full name), out:UINT32 (fieldid) }
dspropFIELDID_FORPARENT, { r in: UINT32 (FieldID), out: UINT32 (FieldID) }
dspropCHANGEINDEX_VIEW, { rw DSAttr (UINT32) (update attributes), any combination, 0->show all }
dspropGETUNIQUEINDEX, { r DSIDX, internal use, returns first unique index, if any }
dspropREMOTE_UPDATEMODE, { rw UINT32, 0: where key, 1: where all, 3: where ch }
dspropXML_STREAMMODE
);
CURProp = (
curpropCONSTRAINT_ERROR_MESSAGE,{ r pCHAR, Constraint Error Message }
curpropDSBASE, { r pDSBASE, Underlying DSBASE) }
curpropSETCRACK, { w Sets crack-value to supplied value (DBERR_NOCURRREC) }
curpropGETORG_RECBUF { r returns recordbuffer for original record, error if none }
);
pDSProps = ^DSProps;
DSProps = packed record
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -