home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 9 / CDACTUAL9.iso / progs / CB / DATA.Z / DB.HPP < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-06  |  63.7 KB  |  1,409 lines

  1. //----------------------------------------------------------------------------
  2. // DB.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
  3. // From: DB.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef DBHPP
  6. #define DBHPP
  7. //----------------------------------------------------------------------------
  8. #ifndef ClassesHPP
  9. #include <Classes.hpp>
  10. #endif
  11.  
  12. #ifndef BdeHPP
  13. #include <Bde.hpp>
  14. #endif
  15.  
  16. #ifndef WindowsHPP
  17. #include <Windows.hpp>
  18. #endif
  19.  
  20. #ifndef SysUtilsHPP
  21. #include <SysUtils.hpp>
  22. #endif
  23.  
  24. #ifndef SystemHPP
  25. #include <System.hpp>
  26. #endif
  27.  
  28. namespace Db
  29. {
  30. //-- type declarations -------------------------------------------------------
  31. typedef Bde::FLDDesc TFieldDescList[1024];
  32.  
  33. typedef TFieldDescList *PFieldDescList;
  34.  
  35. typedef Bde::IDXDesc TIndexDescList[64];
  36.  
  37. typedef TIndexDescList *PIndexDescList;
  38.  
  39. class __declspec(delphiclass) EDatabaseError;
  40. class __declspec(pascalimplementation) EDatabaseError : public Sysutils::Exception
  41. {
  42.     typedef EDatabaseError ThisClass;
  43.     typedef Sysutils::Exception inherited;
  44.     
  45. public:
  46.     /* !! Exception.Create */ __fastcall EDatabaseError(const System::AnsiString Msg) : Sysutils::Exception(
  47.         Msg) { }
  48.     /* !! Exception.CreateFmt */ __fastcall EDatabaseError(const System::AnsiString Msg, const TVarRec 
  49.         *Args, const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
  50.     /* !! Exception.CreateRes */ __fastcall EDatabaseError(System::Integer Ident) : Sysutils::Exception(
  51.         Ident) { }
  52.     /* !! Exception.CreateResFmt */ __fastcall EDatabaseError(System::Integer Ident, const TVarRec *Args
  53.         , const System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
  54.     /* !! Exception.CreateHelp */ __fastcall EDatabaseError(const System::AnsiString Msg, System::Integer 
  55.         AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
  56.     /* !! Exception.CreateFmtHelp */ __fastcall EDatabaseError(const System::AnsiString Msg, const TVarRec 
  57.         *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Msg, Args
  58.         , Args_Size, AHelpContext) { }
  59.     /* !! Exception.CreateResHelp */ __fastcall EDatabaseError(System::Integer Ident, System::Integer AHelpContext
  60.         ) : Sysutils::Exception(Ident, AHelpContext) { }
  61.     /* !! Exception.CreateResFmtHelp */ __fastcall EDatabaseError(System::Integer Ident, const TVarRec 
  62.         *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Ident, 
  63.         Args, Args_Size, AHelpContext) { }
  64.     
  65. public:
  66.     /* !! TObject.Destroy */ __fastcall virtual ~EDatabaseError(void) { }
  67.     
  68. };
  69.  
  70. class __declspec(delphiclass) EDBEngineError;
  71. class __declspec(delphiclass) TDBError;
  72. class __declspec(pascalimplementation) EDBEngineError : public EDatabaseError
  73. {
  74.     typedef EDBEngineError ThisClass;
  75.     typedef EDatabaseError inherited;
  76.     
  77. private:
  78.     Classes::TList *FErrors;
  79.     TDBError *__fastcall GetError(System::Integer Index);
  80.     System::Integer __fastcall GetErrorCount(void);
  81.     
  82. public:
  83.     __fastcall EDBEngineError(System::Word ErrorCode);
  84.     __fastcall virtual ~EDBEngineError(void);
  85.     __property System::Integer ErrorCount = {read=GetErrorCount, nodefault};
  86.     __property TDBError * Errors[System::Integer Index] = {read=GetError};
  87. public:
  88.     /* !! Exception.CreateFmt */ __fastcall EDBEngineError(const System::AnsiString Msg, const TVarRec 
  89.         *Args, const System::Integer Args_Size) : Db::EDatabaseError(Msg, Args, Args_Size) { }
  90.     /* !! Exception.CreateRes */ __fastcall EDBEngineError(System::Integer Ident) : Db::EDatabaseError(
  91.         Ident) { }
  92.     /* !! Exception.CreateResFmt */ __fastcall EDBEngineError(System::Integer Ident, const TVarRec *Args
  93.         , const System::Integer Args_Size) : Db::EDatabaseError(Ident, Args, Args_Size) { }
  94.     /* !! Exception.CreateHelp */ __fastcall EDBEngineError(const System::AnsiString Msg, System::Integer 
  95.         AHelpContext) : Db::EDatabaseError(Msg, AHelpContext) { }
  96.     /* !! Exception.CreateFmtHelp */ __fastcall EDBEngineError(const System::AnsiString Msg, const TVarRec 
  97.         *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Db::EDatabaseError(Msg, Args
  98.         , Args_Size, AHelpContext) { }
  99.     /* !! Exception.CreateResHelp */ __fastcall EDBEngineError(System::Integer Ident, System::Integer AHelpContext
  100.         ) : Db::EDatabaseError(Ident, AHelpContext) { }
  101.     /* !! Exception.CreateResFmtHelp */ __fastcall EDBEngineError(System::Integer Ident, const TVarRec 
  102.         *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Db::EDatabaseError(Ident, 
  103.         Args, Args_Size, AHelpContext) { }
  104.     
  105. };
  106.  
  107. class __declspec(pascalimplementation) TDBError : public System::TObject
  108. {
  109.     typedef TDBError ThisClass;
  110.     typedef System::TObject inherited;
  111.     
  112. private:
  113.     System::Word FErrorCode;
  114.     System::Longint FNativeError;
  115.     System::AnsiString FMessage;
  116.     System::Byte __fastcall GetCategory(void);
  117.     System::Byte __fastcall GetSubCode(void);
  118.     
  119. public:
  120.     __fastcall TDBError(EDBEngineError *Owner, System::Word ErrorCode, System::Longint NativeError, System::PChar 
  121.         Message);
  122.     __property System::Byte Category = {read=GetCategory, nodefault};
  123.     __property System::Word ErrorCode = {read=FErrorCode, nodefault};
  124.     __property System::Byte SubCode = {read=GetSubCode, nodefault};
  125.     __property System::AnsiString Message = {read=FMessage, nodefault};
  126.     __property System::Longint NativeError = {read=FNativeError, nodefault};
  127. public:
  128.     /* !! TObject.Destroy */ __fastcall virtual ~TDBError(void) { }
  129.     
  130. };
  131.  
  132. typedef void *TLocale;
  133.  
  134. typedef Bde::CBRType __fastcall (__closure *TBDECallbackEvent)(System::Pointer CBInfo);
  135.  
  136. class __declspec(delphiclass) TBDECallback;
  137. class __declspec(pascalimplementation) TBDECallback : public System::TObject
  138. {
  139.     typedef TBDECallback ThisClass;
  140.     typedef System::TObject inherited;
  141.     
  142. private:
  143.     Bde::_hDBIObj *FHandle;
  144.     System::TObject *FOwner;
  145.     CBType FCBType;
  146.     System::Longint FOldCBData;
  147.     void *FOldCBBuf;
  148.     System::Word FOldCBBufLen;
  149.     Bde::pfDBICallBack FOldCBFunc;
  150.     System::Boolean FInstalled;
  151.     TBDECallbackEvent FCallbackEvent;
  152.     
  153. protected:
  154.     Bde::CBRType __fastcall Invoke(Bde::CBType CallType, System::Pointer CBInfo);
  155.     
  156. public:
  157.     __fastcall TBDECallback(System::TObject *AOwner, Bde::hDBICur Handle, Bde::CBType CBType, System::Pointer 
  158.         CBBuf, System::Integer CBBufSize, TBDECallbackEvent CallbackEvent, System::Boolean Chain);
  159.     __fastcall virtual ~TBDECallback(void);
  160. };
  161.  
  162. class __declspec(delphiclass) TSessionList;
  163. class __declspec(delphiclass) TSession;
  164. class __declspec(pascalimplementation) TSessionList : public System::TObject
  165. {
  166.     typedef TSessionList ThisClass;
  167.     typedef System::TObject inherited;
  168.     
  169. private:
  170.     Classes::TList *FSessions;
  171.     void __fastcall AddSession(TSession *ASession);
  172.     void __fastcall CloseAll(void);
  173.     System::Integer __fastcall GetCount(void);
  174.     TSession *__fastcall GetSession(System::Integer Index);
  175.     TSession *__fastcall GetCurrentSession(void);
  176.     TSession *__fastcall GetSessionByName(const System::AnsiString SessionName);
  177.     void __fastcall SetCurrentSession(TSession *Value);
  178.     
  179. public:
  180.     __fastcall TSessionList(void);
  181.     __fastcall virtual ~TSessionList(void);
  182.     __property TSession * CurrentSession = {read=GetCurrentSession, write=SetCurrentSession, nodefault}
  183.         ;
  184.     TSession *__fastcall FindSession(const System::AnsiString SessionName);
  185.     void __fastcall GetSessionNames(Classes::TStrings *List);
  186.     TSession *__fastcall OpenSession(const System::AnsiString SessionName);
  187.     __property System::Integer Count = {read=GetCount, nodefault};
  188.     __property TSession * Sessions[System::Integer Index] = {read=GetSession/*, default*/};
  189.     __property TSession * List[System::AnsiString SessionName] = {read=GetSessionByName};
  190. };
  191.  
  192. enum TConfigMode { cmPersistent, cmSession, cmAll };
  193.  
  194. typedef void __fastcall (__closure *TPasswordEvent)(System::TObject *Sender, System::Boolean &Continue
  195.     );
  196.  
  197. enum TDatabaseEvent { dbOpen, dbClose, dbAdd, dbRemove, dbAddAlias, dbDeleteAlias };
  198.  
  199. typedef void __fastcall (__closure *TDatabaseNotifyEvent)(TDatabaseEvent DBEvent, const void *Param)
  200.     ;
  201.  
  202. typedef void __fastcall (*TBDEInitProc)(TSession *Session);
  203.  
  204. enum TTraceFlag { tfQPrepare, tfQExecute, tfError, tfStmt, tfConnect, tfTransact, tfBlob, tfMisc, tfVendor 
  205.     };
  206.  
  207. typedef Set<TTraceFlag, tfQPrepare, tfVendor>  TTraceFlags;
  208.  
  209. typedef System::LongBool __stdcall (*TWriteProc)(System::TObject *Client, System::PChar Data, System::Integer 
  210.     Len);
  211.  
  212. typedef System::TObject *__stdcall (*TSMRegProc)(System::Integer Handle, System::PChar ClientName, TWriteProc 
  213.     &WriteProc, System::TObject *Instance, const System::Pointer SignalProc);
  214.  
  215. class __declspec(delphiclass) TDatabase;
  216. class __declspec(pascalimplementation) TSession : public Classes::TComponent
  217. {
  218.     typedef TSession ThisClass;
  219.     typedef Classes::TComponent inherited;
  220.     
  221. private:
  222.     Bde::_hDBIObj *FHandle;
  223.     System::Boolean FDefault;
  224.     Classes::TList *FDatabases;
  225.     Classes::TList *FCallbacks;
  226.     void *FLocale;
  227.     System::Integer FClientLib;
  228.     TSMRegProc FSMRegProc;
  229.     TWriteProc FSMWriteProc;
  230.     Bde::TRACEDesc *FSMBuffer;
  231.     System::TObject *FSMClient;
  232.     TTraceFlags FTraceFlags;
  233.     System::Boolean FStreamedActive;
  234.     System::Boolean FKeepConnections;
  235.     System::AnsiString FSessionName;
  236.     System::AnsiString FNetFileDir;
  237.     System::AnsiString FPrivateDir;
  238.     CBSCType FCBSCType;
  239.     System::Boolean FDLLDetach;
  240.     System::Boolean FBDEOwnsLoginCbDb;
  241.     System::Integer FLockCount;
  242.     Bde::TCBDBLogin FCBDBLogin;
  243.     TPasswordEvent FOnPassword;
  244.     Classes::TNotifyEvent FOnStartup;
  245.     TDatabaseNotifyEvent FOnDBNotify;
  246.     void __fastcall AddDatabase(TDatabase *Value);
  247.     void __fastcall AddConfigRecord(const System::AnsiString Path, const System::AnsiString Node, Classes::TStrings *
  248.         List);
  249.     void __fastcall CallBDEInitProcs(void);
  250.     void __fastcall CheckInactive(void);
  251.     void __fastcall CheckConfigMode(TConfigMode CfgMode);
  252.     Bde::CBRType __fastcall DBLoginCallback(System::Pointer CBInfo);
  253.     void __fastcall DBNotification(TDatabaseEvent DBEvent, const void *Param);
  254.     void __fastcall DeleteConfigPath(const System::AnsiString Path, const System::AnsiString Node);
  255.     System::Boolean __fastcall GetActive(void);
  256.     TConfigMode __fastcall GetConfigMode(void);
  257.     TDatabase *__fastcall GetDatabase(System::Integer Index);
  258.     System::Integer __fastcall GetDatabaseCount(void);
  259.     Bde::hDBISes __fastcall GetHandle(void);
  260.     System::AnsiString __fastcall GetNetFileDir(void);
  261.     System::AnsiString __fastcall GetPrivateDir(void);
  262.     void __fastcall InitializeBDE(void);
  263.     void __fastcall InternalAddAlias(const System::AnsiString Name, const System::AnsiString Driver, Classes::TStrings *
  264.         List, TConfigMode CfgMode, System::Boolean RestoreMode);
  265.     void __fastcall InternalDeleteAlias(const System::AnsiString Name, TConfigMode CfgMode, System::Boolean 
  266.         RestoreMode);
  267.     void __fastcall LockSession(void);
  268.     void __fastcall MakeCurrent(void);
  269.     void __fastcall ModifyConfigParams(const System::AnsiString Path, const System::AnsiString Node, Classes::TStrings *
  270.         List);
  271.     void __fastcall RegisterCallbacks(System::Boolean Value);
  272.     void __fastcall RemoveDatabase(TDatabase *Value);
  273.     Bde::CBRType __fastcall ServerCallback(System::Pointer CBInfo);
  274.     void __fastcall SetActive(System::Boolean Value);
  275.     void __fastcall SetConfigMode(TConfigMode Value);
  276.     void __fastcall SetConfigParams(const System::AnsiString Path, const System::AnsiString Node, Classes::TStrings *
  277.         List);
  278.     void __fastcall SetNetFileDir(const System::AnsiString Value);
  279.     void __fastcall SetPrivateDir(const System::AnsiString Value);
  280.     void __fastcall SetSessionName(const System::AnsiString Value);
  281.     void __fastcall SetTraceFlags( TTraceFlags Value);
  282.     void __fastcall SMClientSignal(System::TObject *Sender, System::Integer Data);
  283.     Bde::CBRType __fastcall SqlTraceCallback(System::Pointer CBInfo);
  284.     void __fastcall StartSession(System::Boolean Value);
  285.     void __fastcall UnlockSession(void);
  286.     
  287. protected:
  288.     virtual void __fastcall Loaded(void);
  289.     __property TDatabaseNotifyEvent OnDBNotify = {read=FOnDBNotify, write=FOnDBNotify};
  290.     __property System::Boolean BDEOwnsLoginCbDb = {read=FBDEOwnsLoginCbDb, write=FBDEOwnsLoginCbDb, nodefault
  291.         };
  292.     
  293. public:
  294.     __fastcall virtual TSession(Classes::TComponent *AOwner);
  295.     __fastcall virtual ~TSession(void);
  296.     void __fastcall AddAlias(const System::AnsiString Name, const System::AnsiString Driver, Classes::TStrings *
  297.         List);
  298.     void __fastcall AddStandardAlias(const System::AnsiString Name, const System::AnsiString Path, const System::AnsiString 
  299.         DefaultDriver);
  300.     __property TConfigMode ConfigMode = {read=GetConfigMode, write=SetConfigMode, nodefault};
  301.     void __fastcall AddPassword(const System::AnsiString Password);
  302.     void __fastcall Close(void);
  303.     void __fastcall CloseDatabase(TDatabase *Database);
  304.     void __fastcall DeleteAlias(const System::AnsiString Name);
  305.     void __fastcall DropConnections(void);
  306.     TDatabase *__fastcall FindDatabase(const System::AnsiString DatabaseName);
  307.     void __fastcall GetAliasNames(Classes::TStrings *List);
  308.     void __fastcall GetAliasParams(const System::AnsiString AliasName, Classes::TStrings *List);
  309.     System::AnsiString __fastcall GetAliasDriverName(const System::AnsiString AliasName);
  310.     void __fastcall GetConfigParams(const System::AnsiString Path, const System::AnsiString Section, Classes::TStrings *
  311.         List);
  312.     void __fastcall GetDatabaseNames(Classes::TStrings *List);
  313.     void __fastcall GetDriverNames(Classes::TStrings *List);
  314.     void __fastcall GetDriverParams(const System::AnsiString DriverName, Classes::TStrings *List);
  315.     System::Boolean __fastcall GetPassword(void);
  316.     void __fastcall GetTableNames(const System::AnsiString DatabaseName, const System::AnsiString Pattern
  317.         , System::Boolean Extensions, System::Boolean SystemTables, Classes::TStrings *List);
  318.     void __fastcall GetStoredProcNames(const System::AnsiString DatabaseName, Classes::TStrings *List);
  319.         
  320.     System::Boolean __fastcall IsAlias(const System::AnsiString Name);
  321.     void __fastcall ModifyAlias( System::AnsiString Name, Classes::TStrings *List);
  322.     void __fastcall Open(void);
  323.     TDatabase *__fastcall OpenDatabase(const System::AnsiString DatabaseName);
  324.     void __fastcall RemoveAllPasswords(void);
  325.     void __fastcall RemovePassword(const System::AnsiString Password);
  326.     void __fastcall SaveConfigFile(void);
  327.     __property System::Integer DatabaseCount = {read=GetDatabaseCount, nodefault};
  328.     __property TDatabase * Databases[System::Integer Index] = {read=GetDatabase};
  329.     __property Bde::hDBISes Handle = {read=GetHandle, nodefault};
  330.     __property System::Pointer Locale = {read=FLocale, nodefault};
  331.     __property TTraceFlags TraceFlags = {read=FTraceFlags, write=SetTraceFlags, nodefault};
  332.     
  333. __published:
  334.     __property System::Boolean Active = {read=GetActive, write=SetActive, default=0};
  335.     __property System::Boolean KeepConnections = {read=FKeepConnections, write=FKeepConnections, default=1
  336.         };
  337.     __property System::AnsiString NetFileDir = {read=GetNetFileDir, write=SetNetFileDir, nodefault};
  338.     __property System::AnsiString PrivateDir = {read=GetPrivateDir, write=SetPrivateDir, nodefault};
  339.     __property System::AnsiString SessionName = {read=FSessionName, write=SetSessionName, nodefault};
  340.     __property TPasswordEvent OnPassword = {read=FOnPassword, write=FOnPassword};
  341.     __property Classes::TNotifyEvent OnStartup = {read=FOnStartup, write=FOnStartup};
  342. };
  343.  
  344. class __declspec(delphiclass) TParamList;
  345. class __declspec(pascalimplementation) TParamList : public System::TObject
  346. {
  347.     typedef TParamList ThisClass;
  348.     typedef System::TObject inherited;
  349.     
  350. private:
  351.     System::Integer FFieldCount;
  352.     System::Word FBufSize;
  353.     TFieldDescList *FFieldDescs;
  354.     System::Char *FBuffer;
  355.     
  356. public:
  357.     __fastcall TParamList(Classes::TStrings *Params);
  358.     __fastcall virtual ~TParamList(void);
  359.     __property System::PChar Buffer = {read=FBuffer, nodefault};
  360.     __property System::Integer FieldCount = {read=FFieldCount, nodefault};
  361.     __property PFieldDescList FieldDescs = {read=FFieldDescs, nodefault};
  362. };
  363.  
  364. enum TTransIsolation { tiDirtyRead, tiReadCommitted, tiRepeatableRead };
  365.  
  366. typedef void __fastcall (__closure *TLoginEvent)(TDatabase *Database, Classes::TStrings *LoginParams
  367.     );
  368.  
  369. class __declspec(delphiclass) TDBDataSet;
  370. class __declspec(pascalimplementation) TDatabase : public Classes::TComponent
  371. {
  372.     typedef TDatabase ThisClass;
  373.     typedef Classes::TComponent inherited;
  374.     
  375. private:
  376.     Classes::TList *FDataSets;
  377.     TTransIsolation FTransIsolation;
  378.     System::Boolean FLoginPrompt;
  379.     System::Boolean FKeepConnection;
  380.     System::Boolean FTemporary;
  381.     System::Boolean FSessionAlias;
  382.     System::Boolean FStreamedConnected;
  383.     System::Boolean FLocaleLoaded;
  384.     System::Boolean FAliased;
  385.     System::Byte FReserved;
  386.     System::Integer FRefCount;
  387.     Bde::_hDBIObj *FHandle;
  388.     System::Boolean FSQLBased;
  389.     Bde::_hDBIObj *FTransHandle;
  390.     void *FLocale;
  391.     TSession *FSession;
  392.     System::AnsiString FSessionName;
  393.     Classes::TStrings *FParams;
  394.     System::AnsiString FDatabaseName;
  395.     System::AnsiString FDatabaseType;
  396.     System::Boolean FAcquiredHandle;
  397.     TLoginEvent FOnLogin;
  398.     void __fastcall CheckActive(void);
  399.     void __fastcall CheckInactive(void);
  400.     void __fastcall CheckDatabaseName(void);
  401.     void __fastcall CheckDatabaseAlias( System::AnsiString &Password);
  402.     void __fastcall CheckSessionName(System::Boolean Required);
  403.     void __fastcall EndTransaction(Bde::eXEnd TransEnd);
  404.     System::AnsiString __fastcall GetAliasName(void);
  405.     System::Boolean __fastcall GetConnected(void);
  406.     TDBDataSet *__fastcall GetDataSet(System::Integer Index);
  407.     System::Integer __fastcall GetDataSetCount(void);
  408.     System::AnsiString __fastcall GetDirectory(void);
  409.     System::AnsiString __fastcall GetDriverName(void);
  410.     System::Boolean __fastcall GetIsSQLBased(void);
  411.     System::Boolean __fastcall GetInTransaction(void);
  412.     TTraceFlags __fastcall GetTraceFlags(void);
  413.     void __fastcall LoadLocale(void);
  414.     void __fastcall Login(Classes::TStrings *LoginParams);
  415.     void __fastcall ParamsChanging(System::TObject *Sender);
  416.     void __fastcall SetAliasName(const System::AnsiString Value);
  417.     void __fastcall SetConnected(System::Boolean Value);
  418.     void __fastcall SetDatabaseName(const System::AnsiString Value);
  419.     void __fastcall SetDatabaseType(const System::AnsiString Value, System::Boolean Aliased);
  420.     void __fastcall SetDirectory(const System::AnsiString Value);
  421.     void __fastcall SetDriverName(const System::AnsiString Value);
  422.     void __fastcall SetHandle(Bde::hDBIDb Value);
  423.     void __fastcall SetKeepConnection(System::Boolean Value);
  424.     void __fastcall SetParams(Classes::TStrings *Value);
  425.     void __fastcall SetTraceFlags( TTraceFlags Value);
  426.     void __fastcall SetSessionName(const System::AnsiString Value);
  427.     
  428. protected:
  429.     virtual void __fastcall Loaded(void);
  430.     
  431. public:
  432.     __fastcall virtual TDatabase(Classes::TComponent *AOwner);
  433.     __fastcall virtual ~TDatabase(void);
  434.     void __fastcall ApplyUpdates(const TDBDataSet *DataSets, const System::Integer DataSets_Size);
  435.     void __fastcall Close(void);
  436.     void __fastcall CloseDataSets(void);
  437.     void __fastcall Commit(void);
  438.     void __fastcall FlushSchemaCache(const System::AnsiString TableName);
  439.     void __fastcall Open(void);
  440.     void __fastcall Rollback(void);
  441.     void __fastcall StartTransaction(void);
  442.     void __fastcall ValidateName(const System::AnsiString Name);
  443.     __property System::Integer DataSetCount = {read=GetDataSetCount, nodefault};
  444.     __property TDBDataSet * DataSets[System::Integer Index] = {read=GetDataSet};
  445.     __property System::AnsiString Directory = {read=GetDirectory, write=SetDirectory, nodefault};
  446.     __property Bde::hDBIDb Handle = {read=FHandle, write=SetHandle, nodefault};
  447.     __property System::Boolean IsSQLBased = {read=FSQLBased, nodefault};
  448.     __property System::Boolean InTransaction = {read=GetInTransaction, nodefault};
  449.     __property System::Pointer Locale = {read=FLocale, nodefault};
  450.     __property TSession * Session = {read=FSession, nodefault};
  451.     __property System::Boolean Temporary = {read=FTemporary, write=FTemporary, nodefault};
  452.     __property System::Boolean SessionAlias = {read=FSessionAlias, nodefault};
  453.     __property TTraceFlags TraceFlags = {read=GetTraceFlags, write=SetTraceFlags, nodefault};
  454.     
  455. __published:
  456.     __property System::AnsiString AliasName = {read=GetAliasName, write=SetAliasName, nodefault};
  457.     __property System::Boolean Connected = {read=GetConnected, write=SetConnected, default=0};
  458.     __property System::AnsiString DatabaseName = {read=FDatabaseName, write=SetDatabaseName, nodefault}
  459.         ;
  460.     __property System::AnsiString DriverName = {read=GetDriverName, write=SetDriverName, nodefault};
  461.     __property System::Boolean KeepConnection = {read=FKeepConnection, write=SetKeepConnection, default=1
  462.         };
  463.     __property System::Boolean LoginPrompt = {read=FLoginPrompt, write=FLoginPrompt, default=1};
  464.     __property Classes::TStrings * Params = {read=FParams, write=SetParams, nodefault};
  465.     __property System::AnsiString SessionName = {read=FSessionName, write=SetSessionName, nodefault};
  466.     __property TTransIsolation TransIsolation = {read=FTransIsolation, write=FTransIsolation, default=1
  467.         };
  468.     __property TLoginEvent OnLogin = {read=FOnLogin, write=FOnLogin};
  469. };
  470.  
  471. enum TDataEvent { deFieldChange, deRecordChange, deDataSetChange, deDataSetScroll, deLayoutChange, deUpdateRecord, 
  472.     deUpdateState, deCheckBrowseMode, dePropertyChange, deFieldListChange, deFocusControl };
  473.  
  474. class __declspec(delphiclass) TDataSetDesigner;
  475. class __declspec(delphiclass) TDataSet;
  476. class __declspec(delphiclass) TFieldDefs;
  477. class __declspec(delphiclass) TFieldDef;
  478. enum TFieldType { ftUnknown, ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat, ftCurrency, 
  479.     ftBCD, ftDate, ftTime, ftDateTime, ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo, 
  480.     ftParadoxOle, ftDBaseOle, ftTypedBinary };
  481.  
  482. class __declspec(pascalimplementation) TFieldDefs : public System::TObject
  483. {
  484.     typedef TFieldDefs ThisClass;
  485.     typedef System::TObject inherited;
  486.     
  487. private:
  488.     TDataSet *FDataSet;
  489.     Classes::TList *FItems;
  490.     System::Boolean FUpdated;
  491.     System::Byte FReserved;
  492.     System::Integer __fastcall GetCount(void);
  493.     TFieldDef *__fastcall GetItem(System::Integer Index);
  494.     
  495. public:
  496.     __fastcall TFieldDefs(TDataSet *DataSet);
  497.     __fastcall virtual ~TFieldDefs(void);
  498.     void __fastcall Add(const System::AnsiString Name, TFieldType DataType, System::Word Size, System::Boolean 
  499.         Required);
  500.     void __fastcall AddFieldDesc(const Bde::FLDDesc &FieldDesc, System::Boolean Required, System::Word 
  501.         FieldNo);
  502.     void __fastcall Assign(TFieldDefs *FieldDefs);
  503.     void __fastcall Clear(void);
  504.     TFieldDef *__fastcall Find(const System::AnsiString Name);
  505.     System::Integer __fastcall IndexOf(const System::AnsiString Name);
  506.     void __fastcall Update(void);
  507.     __property System::Integer Count = {read=GetCount, nodefault};
  508.     __property TFieldDef * Items[System::Integer Index] = {read=GetItem/*, default*/};
  509. };
  510.  
  511. typedef System::Char *TBufferList[1024];
  512.  
  513. typedef TBufferList *PBufferList;
  514.  
  515. enum TDataSetState { dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsUpdateNew, dsUpdateOld, 
  516.     dsFilter };
  517.  
  518. enum TRecNoStatus { rnDbase, rnParadox, rnNotSupported };
  519.  
  520. class __declspec(delphiclass) TDataLink;
  521. class __declspec(delphiclass) TDataSource;
  522. class __declspec(delphiclass) TField;
  523. typedef void __fastcall (__closure *TDataChangeEvent)(System::TObject *Sender, TField *Field);
  524.  
  525. class __declspec(pascalimplementation) TDataSource : public Classes::TComponent
  526. {
  527.     typedef TDataSource ThisClass;
  528.     typedef Classes::TComponent inherited;
  529.     
  530. private:
  531.     TDataSet *FDataSet;
  532.     Classes::TList *FDataLinks;
  533.     System::Boolean FEnabled;
  534.     System::Boolean FAutoEdit;
  535.     TDataSetState FState;
  536.     System::Byte FReserved;
  537.     Classes::TNotifyEvent FOnStateChange;
  538.     TDataChangeEvent FOnDataChange;
  539.     Classes::TNotifyEvent FOnUpdateData;
  540.     void __fastcall AddDataLink(TDataLink *DataLink);
  541.     void __fastcall DataEvent(TDataEvent Event, System::Longint Info);
  542.     void __fastcall NotifyDataLinks(TDataEvent Event, System::Longint Info);
  543.     void __fastcall RemoveDataLink(TDataLink *DataLink);
  544.     void __fastcall SetDataSet(TDataSet *ADataSet);
  545.     void __fastcall SetEnabled(System::Boolean Value);
  546.     void __fastcall SetState(TDataSetState Value);
  547.     void __fastcall UpdateState(void);
  548.     
  549. public:
  550.     __fastcall virtual TDataSource(Classes::TComponent *AOwner);
  551.     __fastcall virtual ~TDataSource(void);
  552.     void __fastcall Edit(void);
  553.     System::Boolean __fastcall IsLinkedTo(TDataSet *DataSet);
  554.     __property TDataSetState State = {read=FState, nodefault};
  555.     
  556. __published:
  557.     __property System::Boolean AutoEdit = {read=FAutoEdit, write=FAutoEdit, default=1};
  558.     __property TDataSet * DataSet = {read=FDataSet, write=SetDataSet, nodefault};
  559.     __property System::Boolean Enabled = {read=FEnabled, write=SetEnabled, default=1};
  560.     __property Classes::TNotifyEvent OnStateChange = {read=FOnStateChange, write=FOnStateChange};
  561.     __property TDataChangeEvent OnDataChange = {read=FOnDataChange, write=FOnDataChange};
  562.     __property Classes::TNotifyEvent OnUpdateData = {read=FOnUpdateData, write=FOnUpdateData};
  563. };
  564.  
  565. typedef TField **TFieldRef;
  566.  
  567. class __declspec(pascalimplementation) TDataLink : public Classes::TPersistent
  568. {
  569.     typedef TDataLink ThisClass;
  570.     typedef Classes::TPersistent inherited;
  571.     
  572. private:
  573.     TDataSource *FDataSource;
  574.     TDataLink *FNext;
  575.     System::Integer FBufferCount;
  576.     System::Integer FFirstRecord;
  577.     System::Boolean FReadOnly;
  578.     System::Boolean FActive;
  579.     System::Boolean FEditing;
  580.     System::Boolean FUpdating;
  581.     System::Boolean FDataSourceFixed;
  582.     void __fastcall DataEvent(TDataEvent Event, System::Longint Info);
  583.     System::Integer __fastcall GetActiveRecord(void);
  584.     TDataSet *__fastcall GetDataSet(void);
  585.     System::Integer __fastcall GetRecordCount(void);
  586.     void __fastcall SetActive(System::Boolean Value);
  587.     void __fastcall SetActiveRecord(System::Integer Value);
  588.     void __fastcall SetBufferCount(System::Integer Value);
  589.     void __fastcall SetDataSource(TDataSource *ADataSource);
  590.     void __fastcall SetEditing(System::Boolean Value);
  591.     void __fastcall SetReadOnly(System::Boolean Value);
  592.     void __fastcall UpdateRange(void);
  593.     void __fastcall UpdateState(void);
  594.     
  595. protected:
  596.     virtual void __fastcall ActiveChanged(void);
  597.     virtual void __fastcall CheckBrowseMode(void);
  598.     virtual void __fastcall DataSetChanged(void);
  599.     virtual void __fastcall DataSetScrolled(System::Integer Distance);
  600.     virtual void __fastcall FocusControl(TFieldRef Field);
  601.     virtual void __fastcall EditingChanged(void);
  602.     virtual void __fastcall LayoutChanged(void);
  603.     virtual void __fastcall RecordChanged(TField *Field);
  604.     virtual void __fastcall UpdateData(void);
  605.     
  606. public:
  607.     __fastcall TDataLink(void);
  608.     __fastcall virtual ~TDataLink(void);
  609.     System::Boolean __fastcall Edit(void);
  610.     void __fastcall UpdateRecord(void);
  611.     __property System::Boolean Active = {read=FActive, nodefault};
  612.     __property System::Integer ActiveRecord = {read=GetActiveRecord, write=SetActiveRecord, nodefault};
  613.         
  614.     __property System::Integer BufferCount = {read=FBufferCount, write=SetBufferCount, nodefault};
  615.     __property TDataSet * DataSet = {read=GetDataSet, nodefault};
  616.     __property TDataSource * DataSource = {read=FDataSource, write=SetDataSource, nodefault};
  617.     __property System::Boolean DataSourceFixed = {read=FDataSourceFixed, write=FDataSourceFixed, nodefault
  618.         };
  619.     __property System::Boolean Editing = {read=FEditing, nodefault};
  620.     __property System::Boolean ReadOnly = {read=FReadOnly, write=SetReadOnly, nodefault};
  621.     __property System::Integer RecordCount = {read=GetRecordCount, nodefault};
  622. };
  623.  
  624. struct TKeyBuffer;
  625. typedef TKeyBuffer *PKeyBuffer;
  626.  
  627. enum TFilterOption { foCaseInsensitive, foNoPartialCompare };
  628.  
  629. typedef Set<TFilterOption, foCaseInsensitive, foNoPartialCompare>  TFilterOptions;
  630.  
  631. typedef void __fastcall (__closure *TOnServerYieldEvent)(TDataSet *DataSet, System::Boolean &AbortQuery
  632.     );
  633.  
  634. class __declspec(delphiclass) TDataSetUpdateObject;
  635. enum TUpdateKind { ukModify, ukInsert, ukDelete };
  636.  
  637. class __declspec(pascalimplementation) TDataSetUpdateObject : public Classes::TComponent
  638. {
  639.     typedef TDataSetUpdateObject ThisClass;
  640.     typedef Classes::TComponent inherited;
  641.     
  642. protected:
  643.     virtual TDataSet *__fastcall GetDataSet(void) = 0;
  644.     virtual void __fastcall SetDataSet(TDataSet *ADataSet) = 0;
  645.     virtual void __fastcall Apply(TUpdateKind UpdateKind) = 0;
  646.     __property TDataSet * DataSet = {read=GetDataSet, write=SetDataSet, nodefault};
  647. public:
  648.     /* !! TComponent.Create */ __fastcall virtual TDataSetUpdateObject(Classes::TComponent *AOwner) : Classes::TComponent(
  649.         AOwner) { }
  650.     /* !! TComponent.Destroy */ __fastcall virtual ~TDataSetUpdateObject(void) { }
  651.     
  652. };
  653.  
  654. typedef void __fastcall (__closure *TDataSetNotifyEvent)(TDataSet *DataSet);
  655.  
  656. enum TUpdateAction { uaFail, uaAbort, uaSkip, uaRetry, uaApplied };
  657.  
  658. typedef void __fastcall (__closure *TUpdateErrorEvent)(TDataSet *DataSet, EDatabaseError *E, TUpdateKind 
  659.     UpdateKind, TUpdateAction &UpdateAction);
  660.  
  661. typedef void __fastcall (__closure *TUpdateRecordEvent)(TDataSet *DataSet, TUpdateKind UpdateKind, TUpdateAction 
  662.     &UpdateAction);
  663.  
  664. typedef void __fastcall (__closure *TFilterRecordEvent)(TDataSet *DataSet, System::Boolean &Accept);
  665.     
  666.  
  667. enum TDataAction { daFail, daAbort, daRetry };
  668.  
  669. typedef void __fastcall (__closure *TDataSetErrorEvent)(TDataSet *DataSet, EDatabaseError *E, TDataAction 
  670.     &Action);
  671.  
  672. typedef System::Word __fastcall (__closure *TDataOperation)(void);
  673.  
  674. enum TLocateOption { loCaseInsensitive, loPartialKey };
  675.  
  676. typedef Set<TLocateOption, loCaseInsensitive, loPartialKey>  TLocateOptions;
  677.  
  678. enum TGetMode { gmCurrent, gmNext, gmPrior };
  679.  
  680. enum TKeyIndex { kiLookup, kiRangeStart, kiRangeEnd, kiCurRangeStart, kiCurRangeEnd, kiSave };
  681.  
  682. enum DB_41 { rtModified, rtInserted, rtDeleted, rtUnmodified };
  683.  
  684. typedef Set<DB_41, rtModified, rtUnmodified>  TUpdateRecordTypes;
  685.  
  686. enum DB_21 { rmExact, rmCenter };
  687.  
  688. typedef Set<DB_21, rmExact, rmCenter>  TResyncMode;
  689.  
  690. enum TUpdateStatus { usUnmodified, usModified, usInserted, usDeleted };
  691.  
  692. class __declspec(pascalimplementation) TDataSet : public Classes::TComponent
  693. {
  694.     typedef TDataSet ThisClass;
  695.     typedef Classes::TComponent inherited;
  696.     
  697. private:
  698.     Classes::TList *FFields;
  699.     Classes::TList *FDataSources;
  700.     TFieldDefs *FFieldDefs;
  701.     TBufferList *FBuffers;
  702.     System::Integer FBufListSize;
  703.     System::Integer FBufferCount;
  704.     System::Integer FRecordCount;
  705.     System::Integer FActiveRecord;
  706.     System::Integer FCurrentRecord;
  707.     Bde::_hDBIObj *FHandle;
  708.     System::Boolean FBOF;
  709.     System::Boolean FEOF;
  710.     TDataSetState FState;
  711.     System::Boolean FAutoCalcFields;
  712.     System::Boolean FDefaultFields;
  713.     System::Boolean FCanModify;
  714.     System::Boolean FModified;
  715.     System::Boolean FStreamedActive;
  716.     System::Boolean FInfoQueryMode;
  717.     TDataSetState FDisableState;
  718.     TDataEvent FEnableEvent;
  719.     System::Boolean FFiltered;
  720.     System::Boolean FFound;
  721.     Bde::RECProps FRecProps;
  722.     System::Integer FRawFieldCount;
  723.     System::Word FRecordSize;
  724.     System::Word FBookmarkSize;
  725.     System::Word FRecInfoOfs;
  726.     System::Word FBookmarkOfs;
  727.     TRecNoStatus FRecNoStatus;
  728.     System::Word FKeySize;
  729.     System::Boolean FExpIndex;
  730.     System::Boolean FCaseInsIndex;
  731.     System::Word FCalcFieldsSize;
  732.     System::Word FRecBufSize;
  733.     System::Integer FDisableCount;
  734.     TDataLink *FFirstDataLink;
  735.     void *FLocale;
  736.     TDataSetDesigner *FDesigner;
  737.     TKeyBuffer *FKeyBuffers[6];
  738.     TKeyBuffer *FKeyBuffer;
  739.     System::Char *FCalcBuffer;
  740.     System::AnsiString FFilterText;
  741.     TFilterOptions FFilterOptions;
  742.     Bde::_hDBIObj *FExprFilter;
  743.     Bde::_hDBIObj *FFuncFilter;
  744.     System::Char *FFilterBuffer;
  745.     System::Integer FIndexFieldCount;
  746.     System::Word FIndexFieldMap[16];
  747.     System::Boolean FBDECalcFields;
  748.     System::Boolean FCachedUpdates;
  749.     Bde::DELAYUPDCbDesc *FUpdateCBBuf;
  750.     TBDECallback *FUpdateCallback;
  751.     System::Boolean FInUpdateCallback;
  752.     System::Word FUpdateErrCode;
  753.     TBDECallback *FAsyncCallback;
  754.     CBYieldStep FCBYieldStep;
  755.     TOnServerYieldEvent FOnServerYield;
  756.     TDataSetUpdateObject *FUpdateObject;
  757.     TDataSetNotifyEvent FBeforeOpen;
  758.     TDataSetNotifyEvent FAfterOpen;
  759.     TDataSetNotifyEvent FBeforeClose;
  760.     TDataSetNotifyEvent FAfterClose;
  761.     TDataSetNotifyEvent FBeforeInsert;
  762.     TDataSetNotifyEvent FAfterInsert;
  763.     TDataSetNotifyEvent FBeforeEdit;
  764.     TDataSetNotifyEvent FAfterEdit;
  765.     TDataSetNotifyEvent FBeforePost;
  766.     TDataSetNotifyEvent FAfterPost;
  767.     TDataSetNotifyEvent FBeforeCancel;
  768.     TDataSetNotifyEvent FAfterCancel;
  769.     TDataSetNotifyEvent FBeforeDelete;
  770.     TDataSetNotifyEvent FAfterDelete;
  771.     TDataSetNotifyEvent FOnNewRecord;
  772.     TDataSetNotifyEvent FOnCalcFields;
  773.     TUpdateErrorEvent FOnUpdateError;
  774.     TUpdateRecordEvent FOnUpdateRecord;
  775.     TFilterRecordEvent FOnFilterRecord;
  776.     TDataSetErrorEvent FOnEditError;
  777.     TDataSetErrorEvent FOnPostError;
  778.     TDataSetErrorEvent FOnDeleteError;
  779.     void __fastcall ActivateBuffers(void);
  780.     void __fastcall ActivateFilters(void);
  781.     void __fastcall AddDataSource(TDataSource *DataSource);
  782.     void __fastcall AddField(TField *Field);
  783.     void __fastcall AddRecord(const TVarRec *Values, const System::Integer Values_Size, System::Boolean 
  784.         Append);
  785.     void __fastcall AllocKeyBuffers(void);
  786.     void __fastcall AllocDelUpdCBBuf(System::Boolean Allocate);
  787.     void __fastcall BeginInsertAppend(void);
  788.     void __fastcall BindFields(System::Boolean Binding);
  789.     Bde::CBRType __fastcall CachedUpdateCallBack(System::Pointer CBInfo);
  790.     void __fastcall CalculateBDEFields(void);
  791.     void __fastcall CalculateFields(void);
  792.     void __fastcall CheckCanModify(void);
  793.     void __fastcall CheckCachedUpdateMode(void);
  794.     void __fastcall CheckFieldName(const System::AnsiString FieldName);
  795.     void __fastcall CheckFieldNames(const System::AnsiString FieldNames);
  796.     void __fastcall CheckOperation(TDataOperation Operation, TDataSetErrorEvent ErrorEvent);
  797.     void __fastcall CheckRequiredFields(void);
  798.     void __fastcall CheckSetKeyMode(void);
  799.     void __fastcall CopyBuffer(System::Integer SourceIndex, System::Integer DestIndex);
  800.     Bde::hDBIFilter __fastcall CreateExprFilter(const System::AnsiString Expr,  TFilterOptions Options, 
  801.         System::Integer Priority);
  802.     void __fastcall CreateFields(void);
  803.     Bde::hDBIFilter __fastcall CreateFuncFilter(System::Pointer FilterFunc, System::Integer Priority);
  804.     Bde::hDBIFilter __fastcall CreateLookupFilter(Classes::TList *Fields, const System::Variant &Values
  805.         ,  TLocateOptions Options, System::Integer Priority);
  806.     void __fastcall DeactivateFilters(void);
  807.     System::Word __fastcall DeleteRecord(void);
  808.     void __fastcall DestroyFields(void);
  809.     System::Word __fastcall EditRecord(void);
  810.     void __fastcall EndInsertAppend(void);
  811.     TField *__fastcall FieldByNumber(System::Integer FieldNo);
  812.     System::Boolean __fastcall FindRecord(System::Boolean Restart, System::Boolean GoForward);
  813.     void __fastcall FreeFieldBuffers(void);
  814.     void __fastcall FreeKeyBuffers(void);
  815.     System::Boolean __fastcall GetActive(void);
  816.     System::AnsiString __fastcall GetBookmarkStr(void);
  817.     void __fastcall GetCalcFields(System::Integer Index);
  818.     TField *__fastcall GetField(System::Integer Index);
  819.     System::Integer __fastcall GetFieldCount(void);
  820.     System::Variant __fastcall GetFieldValue(const System::AnsiString FieldName);
  821.     void __fastcall GetIndexInfo(void);
  822.     System::Boolean __fastcall GetNextRecord(void);
  823.     System::Integer __fastcall GetNextRecords(void);
  824.     System::Boolean __fastcall GetPriorRecord(void);
  825.     System::Integer __fastcall GetPriorRecords(void);
  826.     System::Word __fastcall GetRecord(System::Integer Index, TGetMode GetMode);
  827.     System::Longint __fastcall GetRecordCount(void);
  828.     System::Boolean __fastcall GetUpdatesPending(void);
  829.     PKeyBuffer __fastcall InitKeyBuffer(PKeyBuffer Buffer);
  830.     void __fastcall InitRecord(System::PChar Buffer);
  831.     void __fastcall InternalClose(void);
  832.     void __fastcall InternalOpen(void);
  833.     System::Boolean __fastcall LocateRecord(const System::AnsiString KeyFields, const System::Variant &KeyValues
  834.         ,  TLocateOptions Options, System::Boolean SyncCursor);
  835.     System::Boolean __fastcall MapsToIndex(Classes::TList *Fields, System::Boolean CaseInsensitive);
  836.     void __fastcall MoveBuffer(System::Integer CurIndex, System::Integer NewIndex);
  837.     void __fastcall PostKeyBuffer(System::Boolean Commit);
  838.     System::Word __fastcall PostRecord(void);
  839.     System::Smallint __stdcall RecordFilter(System::Pointer RecBuf, System::Integer RecNo);
  840.     void __fastcall RemoveDataSource(TDataSource *DataSource);
  841.     void __fastcall RemoveField(TField *Field);
  842.     void __fastcall SetActive(System::Boolean Value);
  843.     void __fastcall SetBookmarkStr(const System::AnsiString Value);
  844.     void __fastcall SetBufferCount(System::Integer Value);
  845.     void __fastcall SetBufListSize(System::Integer Value);
  846.     void __fastcall SetCurrentRecord(System::Integer Index);
  847.     void __fastcall SetField(System::Integer Index, TField *Value);
  848.     void __fastcall SetFieldDefs(TFieldDefs *Value);
  849.     void __fastcall SetFieldValue(const System::AnsiString FieldName, const System::Variant &Value);
  850.     void __fastcall SetFilterData(const System::AnsiString Text,  TFilterOptions Options);
  851.     void __fastcall SetFiltered(System::Boolean Value);
  852.     void __fastcall SetFilterHandle(Bde::hDBIFilter &Filter, Bde::hDBIFilter Value);
  853.     void __fastcall SetFilterOptions( TFilterOptions Value);
  854.     void __fastcall SetFilterText(const System::AnsiString Value);
  855.     void __fastcall SetOnFilterRecord(const TFilterRecordEvent Value);
  856.     void __fastcall SetOnUpdateError(TUpdateErrorEvent UpdateEvent);
  857.     void __fastcall SetState(TDataSetState Value);
  858.     void __fastcall UpdateBufferCount(void);
  859.     System::Boolean __fastcall UpdateCallbackRequired(void);
  860.     void __fastcall UpdateFieldDefs(void);
  861.     Bde::CBRType __fastcall YieldCallBack(System::Pointer CBInfo);
  862.     
  863. protected:
  864.     void __fastcall CheckInactive(void);
  865.     void __fastcall ClearBuffers(void);
  866.     virtual void __fastcall CloseCursor(void);
  867.     virtual Bde::hDBICur __fastcall CreateHandle(void);
  868.     virtual void __fastcall DataEvent(TDataEvent Event, System::Longint Info);
  869.     virtual void __fastcall DestroyHandle(void);
  870.     virtual void __fastcall DestroyLookupCursor(void);
  871.     virtual void __fastcall DoAfterCancel(void);
  872.     virtual void __fastcall DoAfterClose(void);
  873.     virtual void __fastcall DoAfterDelete(void);
  874.     virtual void __fastcall DoAfterEdit(void);
  875.     virtual void __fastcall DoAfterInsert(void);
  876.     virtual void __fastcall DoAfterOpen(void);
  877.     virtual void __fastcall DoAfterPost(void);
  878.     virtual void __fastcall DoBeforeCancel(void);
  879.     virtual void __fastcall DoBeforeClose(void);
  880.     virtual void __fastcall DoBeforeDelete(void);
  881.     virtual void __fastcall DoBeforeEdit(void);
  882.     virtual void __fastcall DoBeforeInsert(void);
  883.     virtual void __fastcall DoBeforeOpen(void);
  884.     virtual void __fastcall DoBeforePost(void);
  885.     virtual void __fastcall DoOnCalcFields(void);
  886.     virtual void __fastcall DoOnNewRecord(void);
  887.     virtual System::Boolean __fastcall GetCanModify(void);
  888.     virtual TDataSource *__fastcall GetDataSource(void);
  889.     TField *__fastcall GetIndexField(System::Integer Index);
  890.     System::Integer __fastcall GetIndexFieldCount(void);
  891.     PKeyBuffer __fastcall GetKeyBuffer(TKeyIndex KeyIndex);
  892.     System::Boolean __fastcall GetKeyExclusive(void);
  893.     System::Integer __fastcall GetKeyFieldCount(void);
  894.     virtual Bde::hDBICur __fastcall GetLookupCursor(const System::AnsiString KeyFields, System::Boolean 
  895.         CaseInsensitive);
  896.     virtual System::Longint __fastcall GetRecordNumber(void);
  897.     virtual void __fastcall InitFieldDefs(void);
  898.     virtual void __fastcall Loaded(void);
  899.     virtual void __fastcall OpenCursor(void);
  900.     virtual void __fastcall PrepareCursor(void);
  901.     System::Boolean __fastcall ResetCursorRange(void);
  902.     System::Boolean __fastcall SetCursorRange(void);
  903.     void __fastcall SetIndexField(System::Integer Index, TField *Value);
  904.     void __fastcall SetKeyBuffer(TKeyIndex KeyIndex, System::Boolean Clear);
  905.     void __fastcall SetKeyExclusive(System::Boolean Value);
  906.     void __fastcall SetKeyFieldCount(System::Integer Value);
  907.     void __fastcall SetKeyFields(TKeyIndex KeyIndex, const TVarRec *Values, const System::Integer Values_Size
  908.         );
  909.     void __fastcall SetLinkRanges(Classes::TList *MasterFields);
  910.     void __fastcall SetLocale(System::Pointer Value);
  911.     virtual void __fastcall SetName(const System::AnsiString Value);
  912.     void __fastcall SwitchToIndex(const System::AnsiString IndexName, const System::AnsiString TagName)
  913.         ;
  914.     virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);
  915.     virtual void __fastcall SetChildOrder(Classes::TComponent *Component, System::Integer Order);
  916.     __property System::Boolean InfoQueryMode = {read=FInfoQueryMode, nodefault};
  917.     void __fastcall SetCachedUpdates(System::Boolean Value);
  918.     void __fastcall SetupCallBack(System::Boolean Value);
  919.     System::Word __fastcall ProcessUpdates(Bde::DBIDelayedUpdCmd UpdCmd);
  920.     TUpdateRecordTypes __fastcall GetUpdateRecordSet(void);
  921.     void __fastcall SetUpdateRecordSet( TUpdateRecordTypes RecordTypes);
  922.     void __fastcall SetUpdateObject(TDataSetUpdateObject *Value);
  923.     System::Boolean __fastcall ForceUpdateCallback(void);
  924.     
  925. public:
  926.     __fastcall virtual TDataSet(Classes::TComponent *AOwner);
  927.     __fastcall virtual ~TDataSet(void);
  928.     System::PChar __fastcall ActiveBuffer(void);
  929.     void __fastcall Append(void);
  930.     void __fastcall AppendRecord(const TVarRec *Values, const System::Integer Values_Size);
  931.     void __fastcall Cancel(void);
  932.     void __fastcall CheckBrowseMode(void);
  933.     void __fastcall ClearFields(void);
  934.     void __fastcall Close(void);
  935.     System::Boolean __fastcall ControlsDisabled(void);
  936.     void __fastcall CursorPosChanged(void);
  937.     void __fastcall Delete(void);
  938.     void __fastcall DisableControls(void);
  939.     void __fastcall Edit(void);
  940.     void __fastcall EnableControls(void);
  941.     void __fastcall FetchAll(void);
  942.     TField *__fastcall FieldByName(const System::AnsiString FieldName);
  943.     TField *__fastcall FindField(const System::AnsiString FieldName);
  944.     System::Boolean __fastcall FindFirst(void);
  945.     System::Boolean __fastcall FindLast(void);
  946.     System::Boolean __fastcall FindNext(void);
  947.     System::Boolean __fastcall FindPrior(void);
  948.     void __fastcall First(void);
  949.     void __fastcall FreeBookmark(System::Pointer Bookmark);
  950.     System::Pointer __fastcall GetBookmark(void);
  951.     System::Boolean __fastcall GetCurrentRecord(System::PChar Buffer);
  952.     void __fastcall GetFieldList(Classes::TList *List, const System::AnsiString FieldNames);
  953.     void __fastcall GetFieldNames(Classes::TStrings *List);
  954.     void __fastcall GotoBookmark(System::Pointer Bookmark);
  955.     void __fastcall Insert(void);
  956.     void __fastcall InsertRecord(const TVarRec *Values, const System::Integer Values_Size);
  957.     System::Boolean __fastcall IsLinkedTo(TDataSource *DataSource);
  958.     void __fastcall Last(void);
  959.     System::Boolean __fastcall Locate(const System::AnsiString KeyFields, const System::Variant &KeyValues
  960.         ,  TLocateOptions Options);
  961.     System::Variant __fastcall Lookup(const System::AnsiString KeyFields, const System::Variant &KeyValues
  962.         , const System::AnsiString ResultFields);
  963.     System::Integer __fastcall MoveBy(System::Integer Distance);
  964.     void __fastcall Next(void);
  965.     void __fastcall Open(void);
  966.     void __fastcall Post(void);
  967.     void __fastcall Prior(void);
  968.     void __fastcall Refresh(void);
  969.     void __fastcall Resync( TResyncMode Mode);
  970.     void __fastcall SetFields(const TVarRec *Values, const System::Integer Values_Size);
  971.     void __fastcall SetDetailFields(Classes::TList *MasterFields);
  972.     void __fastcall UpdateCursorPos(void);
  973.     void __fastcall UpdateRecord(void);
  974.     void __fastcall ApplyUpdates(void);
  975.     void __fastcall CommitUpdates(void);
  976.     void __fastcall CancelUpdates(void);
  977.     void __fastcall RevertRecord(void);
  978.     TUpdateStatus __fastcall UpdateStatus(void);
  979.     __property System::Boolean BOF = {read=FBOF, nodefault};
  980.     __property System::AnsiString Bookmark = {read=GetBookmarkStr, write=SetBookmarkStr, nodefault};
  981.     __property System::Boolean CanModify = {read=GetCanModify, nodefault};
  982.     __property TDataSource * DataSource = {read=GetDataSource, nodefault};
  983.     __property System::Boolean DefaultFields = {read=FDefaultFields, nodefault};
  984.     __property TDataSetDesigner * Designer = {read=FDesigner, nodefault};
  985.     __property System::Boolean Eof = {read=FEOF, nodefault};
  986.     __property System::Boolean ExpIndex = {read=FExpIndex, nodefault};
  987.     __property System::Integer FieldCount = {read=GetFieldCount, nodefault};
  988.     __property TFieldDefs * FieldDefs = {read=FFieldDefs, write=SetFieldDefs, nodefault};
  989.     __property TField * Fields[System::Integer Index] = {read=GetField, write=SetField};
  990.     __property System::Variant FieldValues[System::AnsiString FieldName] = {read=GetFieldValue, write=SetFieldValue
  991.         /*, default*/};
  992.     __property System::Boolean Found = {read=FFound, nodefault};
  993.     __property Bde::hDBICur Handle = {read=FHandle, nodefault};
  994.     __property System::Word KeySize = {read=FKeySize, nodefault};
  995.     __property System::Pointer Locale = {read=FLocale, nodefault};
  996.     __property System::Boolean Modified = {read=FModified, nodefault};
  997.     __property System::Longint RecordCount = {read=GetRecordCount, nodefault};
  998.     __property System::Longint RecNo = {read=GetRecordNumber, nodefault};
  999.     __property System::Word RecordSize = {read=FRecordSize, nodefault};
  1000.     __property TDataSetState State = {read=FState, nodefault};
  1001.     __property TDataSetUpdateObject * UpdateObject = {read=FUpdateObject, write=SetUpdateObject, nodefault
  1002.         };
  1003.     __property TUpdateRecordTypes UpdateRecordTypes = {read=GetUpdateRecordSet, write=SetUpdateRecordSet
  1004.         , nodefault};
  1005.     __property System::Boolean UpdatesPending = {read=GetUpdatesPending, nodefault};
  1006.     
  1007. __published:
  1008.     __property System::Boolean Active = {read=GetActive, write=SetActive, default=0};
  1009.     __property System::Boolean AutoCalcFields = {read=FAutoCalcFields, write=FAutoCalcFields, default=1
  1010.         };
  1011.     __property System::Boolean CachedUpdates = {read=FCachedUpdates, write=SetCachedUpdates, default=0}
  1012.         ;
  1013.     __property System::AnsiString Filter = {read=FFilterText, write=SetFilterText, nodefault};
  1014.     __property System::Boolean Filtered = {read=FFiltered, write=SetFiltered, default=0};
  1015.     __property TFilterOptions FilterOptions = {read=FFilterOptions, write=SetFilterOptions, default=0};
  1016.         
  1017.     __property TDataSetNotifyEvent BeforeOpen = {read=FBeforeOpen, write=FBeforeOpen};
  1018.     __property TDataSetNotifyEvent AfterOpen = {read=FAfterOpen, write=FAfterOpen};
  1019.     __property TDataSetNotifyEvent BeforeClose = {read=FBeforeClose, write=FBeforeClose};
  1020.     __property TDataSetNotifyEvent AfterClose = {read=FAfterClose, write=FAfterClose};
  1021.     __property TDataSetNotifyEvent BeforeInsert = {read=FBeforeInsert, write=FBeforeInsert};
  1022.     __property TDataSetNotifyEvent AfterInsert = {read=FAfterInsert, write=FAfterInsert};
  1023.     __property TDataSetNotifyEvent BeforeEdit = {read=FBeforeEdit, write=FBeforeEdit};
  1024.     __property TDataSetNotifyEvent AfterEdit = {read=FAfterEdit, write=FAfterEdit};
  1025.     __property TDataSetNotifyEvent BeforePost = {read=FBeforePost, write=FBeforePost};
  1026.     __property TDataSetNotifyEvent AfterPost = {read=FAfterPost, write=FAfterPost};
  1027.     __property TDataSetNotifyEvent BeforeCancel = {read=FBeforeCancel, write=FBeforeCancel};
  1028.     __property TDataSetNotifyEvent AfterCancel = {read=FAfterCancel, write=FAfterCancel};
  1029.     __property TDataSetNotifyEvent BeforeDelete = {read=FBeforeDelete, write=FBeforeDelete};
  1030.     __property TDataSetNotifyEvent AfterDelete = {read=FAfterDelete, write=FAfterDelete};
  1031.     __property TDataSetNotifyEvent OnNewRecord = {read=FOnNewRecord, write=FOnNewRecord};
  1032.     __property TDataSetNotifyEvent OnCalcFields = {read=FOnCalcFields, write=FOnCalcFields};
  1033.     __property TFilterRecordEvent OnFilterRecord = {read=FOnFilterRecord, write=SetOnFilterRecord};
  1034.     __property TOnServerYieldEvent OnServerYield = {read=FOnServerYield, write=FOnServerYield};
  1035.     __property TUpdateErrorEvent OnUpdateError = {read=FOnUpdateError, write=SetOnUpdateError};
  1036.     __property TUpdateRecordEvent OnUpdateRecord = {read=FOnUpdateRecord, write=FOnUpdateRecord};
  1037.     __property TDataSetErrorEvent OnEditError = {read=FOnEditError, write=FOnEditError};
  1038.     __property TDataSetErrorEvent OnPostError = {read=FOnPostError, write=FOnPostError};
  1039.     __property TDataSetErrorEvent OnDeleteError = {read=FOnDeleteError, write=FOnDeleteError};
  1040. };
  1041.  
  1042. class __declspec(pascalimplementation) TDataSetDesigner : public System::TObject
  1043. {
  1044.     typedef TDataSetDesigner ThisClass;
  1045.     typedef System::TObject inherited;
  1046.     
  1047. private:
  1048.     TDataSet *FDataSet;
  1049.     System::Boolean FSaveActive;
  1050.     System::Byte FReserved;
  1051.     
  1052. public:
  1053.     __fastcall TDataSetDesigner(TDataSet *DataSet);
  1054.     __fastcall virtual ~TDataSetDesigner(void);
  1055.     void __fastcall BeginDesign(void);
  1056.     virtual void __fastcall DataEvent(TDataEvent Event, System::Longint Info);
  1057.     void __fastcall EndDesign(void);
  1058.     __property TDataSet * DataSet = {read=FDataSet, nodefault};
  1059. };
  1060.  
  1061. typedef System::TMetaClass *TFieldClass;
  1062.  
  1063. class __declspec(pascalimplementation) TFieldDef : public System::TObject
  1064. {
  1065.     typedef TFieldDef ThisClass;
  1066.     typedef System::TObject inherited;
  1067.     
  1068. private:
  1069.     TFieldDefs *FOwner;
  1070.     System::AnsiString FName;
  1071.     TFieldType FDataType;
  1072.     System::Boolean FRequired;
  1073.     System::Boolean FBDECalcField;
  1074.     System::Word FSize;
  1075.     System::Integer FFieldNo;
  1076.     System::TMetaClass * __fastcall GetFieldClass(void);
  1077.     
  1078. public:
  1079.     __fastcall TFieldDef(TFieldDefs *Owner, const System::AnsiString Name, TFieldType DataType, System::Word 
  1080.         Size, System::Boolean Required, System::Integer FieldNo);
  1081.     __fastcall virtual ~TFieldDef(void);
  1082.     TField *__fastcall CreateField(Classes::TComponent *Owner);
  1083.     __property System::Boolean BDECalcField = {read=FBDECalcField, nodefault};
  1084.     __property TFieldType DataType = {read=FDataType, nodefault};
  1085.     __property System::TMetaClass * FieldClass = {read=GetFieldClass, nodefault};
  1086.     __property System::Integer FieldNo = {read=FFieldNo, nodefault};
  1087.     __property System::AnsiString Name = {read=FName, nodefault};
  1088.     __property System::Boolean Required = {read=FRequired, nodefault};
  1089.     __property System::Word Size = {read=FSize, nodefault};
  1090. };
  1091.  
  1092. typedef void *TBookmark;
  1093.  
  1094. typedef System::AnsiString TBookmarkStr;
  1095.  
  1096. struct DB_31
  1097. {
  1098.     
  1099. } ;
  1100.  
  1101. struct TKeyBuffer
  1102. {
  1103.     System::Boolean Modified;
  1104.     System::Boolean Exclusive;
  1105.     System::Integer FieldCount;
  1106.     DB_31 Data;
  1107. } ;
  1108.  
  1109. struct TRecInfo;
  1110. typedef TRecInfo *PRecInfo;
  1111.  
  1112. struct TRecInfo
  1113. {
  1114.     TUpdateStatus UpdateStatus;
  1115.     System::Longint RecordNumber;
  1116. } ;
  1117.  
  1118. enum TUpdateMode { upWhereAll, upWhereChanged, upWhereKeyOnly };
  1119.  
  1120. typedef Set<System::Shortint, 0, 15>  TDBFlags;
  1121.  
  1122. class __declspec(pascalimplementation) TDBDataSet : public TDataSet
  1123. {
  1124.     typedef TDBDataSet ThisClass;
  1125.     typedef TDataSet inherited;
  1126.     
  1127. private:
  1128.     TDBFlags FDBFlags;
  1129.     TUpdateMode FUpdateMode;
  1130.     System::Byte FReserved;
  1131.     TDatabase *FDatabase;
  1132.     System::AnsiString FDatabaseName;
  1133.     System::AnsiString FSessionName;
  1134.     void __fastcall CheckDBSessionName(void);
  1135.     System::Boolean __fastcall GetDBFlag(System::Integer Flag);
  1136.     Bde::hDBIDb __fastcall GetDBHandle(void);
  1137.     System::Pointer __fastcall GetDBLocale(void);
  1138.     TSession *__fastcall GetDBSession(void);
  1139.     void __fastcall SetDatabaseName(const System::AnsiString Value);
  1140.     void __fastcall SetSessionName(const System::AnsiString Value);
  1141.     void __fastcall SetUpdateMode(const TUpdateMode Value);
  1142.     
  1143. protected:
  1144.     virtual void __fastcall CloseCursor(void);
  1145.     virtual void __fastcall Disconnect(void);
  1146.     virtual void __fastcall OpenCursor(void);
  1147.     virtual void __fastcall SetDBFlag(System::Integer Flag, System::Boolean Value);
  1148.     __property TDBFlags DBFlags = {read=FDBFlags, nodefault};
  1149.     __property TUpdateMode UpdateMode = {read=FUpdateMode, write=SetUpdateMode, default=0};
  1150.     
  1151. public:
  1152.     System::Boolean __fastcall CheckOpen(System::Word Status);
  1153.     __property TDatabase * Database = {read=FDatabase, nodefault};
  1154.     __property Bde::hDBIDb DBHandle = {read=GetDBHandle, nodefault};
  1155.     __property System::Pointer DBLocale = {read=GetDBLocale, nodefault};
  1156.     __property TSession * DBSession = {read=GetDBSession, nodefault};
  1157.     
  1158. __published:
  1159.     __property System::AnsiString DatabaseName = {read=FDatabaseName, write=SetDatabaseName, nodefault}
  1160.         ;
  1161.     __property System::AnsiString SessionName = {read=FSessionName, write=SetSessionName, nodefault};
  1162. public:
  1163.         
  1164.     /* !! TDataSet.Create */ __fastcall virtual TDBDataSet(Classes::TComponent *AOwner) : Db::TDataSet(
  1165.         AOwner) { }
  1166.     /* !! TDataSet.Destroy */ __fastcall virtual ~TDBDataSet(void) { }
  1167.     
  1168. };
  1169.  
  1170. enum TFieldKind { fkData, fkCalculated, fkLookup };
  1171.  
  1172. typedef void __fastcall (__closure *TFieldNotifyEvent)(TField *Sender);
  1173.  
  1174. typedef void __fastcall (__closure *TFieldGetTextEvent)(TField *Sender,  System::AnsiString &Text, System::Boolean 
  1175.     DisplayText);
  1176.  
  1177. typedef void __fastcall (__closure *TFieldSetTextEvent)(TField *Sender, const System::AnsiString Text
  1178.     );
  1179.  
  1180. class __declspec(pascalimplementation) TField : public Classes::TComponent
  1181. {
  1182.     typedef TField ThisClass;
  1183.     typedef Classes::TComponent inherited;
  1184.     
  1185. private:
  1186.     TDataSet *FDataSet;
  1187.     System::AnsiString FFieldName;
  1188.     TFieldType FDataType;
  1189.     System::Boolean FReadOnly;
  1190.     TFieldKind FFieldKind;
  1191.     TAlignment FAlignment;
  1192.     System::Boolean FVisible;
  1193.     System::Boolean FRequired;
  1194.     System::Boolean FValidating;
  1195.     System::Word FSize;
  1196.     System::Word FDataSize;
  1197.     System::Integer FFieldNo;
  1198.     System::Word FOffset;
  1199.     System::Integer FDisplayWidth;
  1200.     System::AnsiString FDisplayLabel;
  1201.     System::AnsiString FEditMask;
  1202.     void *FValueBuffer;
  1203.     TDataSet *FLookupDataSet;
  1204.     System::AnsiString FKeyFields;
  1205.     System::AnsiString FLookupKeyFields;
  1206.     System::AnsiString FLookupResultField;
  1207.     System::AnsiString FAttributeSet;
  1208.     TFieldNotifyEvent FOnChange;
  1209.     TFieldNotifyEvent FOnValidate;
  1210.     TFieldGetTextEvent FOnGetText;
  1211.     TFieldSetTextEvent FOnSetText;
  1212.     void __fastcall Bind(System::Boolean Binding);
  1213.     void __fastcall CalcLookupValue(void);
  1214.     System::Boolean __fastcall GetBDECalcField(void);
  1215.     System::Boolean __fastcall GetCalculated(void);
  1216.     System::AnsiString __fastcall GetDisplayLabel(void);
  1217.     System::AnsiString __fastcall GetDisplayName(void);
  1218.     System::AnsiString __fastcall GetDisplayText(void);
  1219.     System::Integer __fastcall GetDisplayWidth(void);
  1220.     System::AnsiString __fastcall GetEditText(void);
  1221.     System::Integer __fastcall GetIndex(void);
  1222.     System::Boolean __fastcall GetIsIndexField(void);
  1223.     System::Boolean __fastcall GetIsNull(void);
  1224.     System::Boolean __fastcall GetLookup(void);
  1225.     System::Variant __fastcall GetNewValue(void);
  1226.     System::Variant __fastcall GetOldValue(void);
  1227.     System::Variant __fastcall GetUpdateValue(TDataSetState ValueState);
  1228.     System::Boolean __fastcall IsDisplayLabelStored(void);
  1229.     System::Boolean __fastcall IsDisplayWidthStored(void);
  1230.     void __fastcall ReadAttributeSet(Classes::TReader *Reader);
  1231.     void __fastcall SetAlignment(Classes::TAlignment Value);
  1232.     void __fastcall SetCalculated(System::Boolean Value);
  1233.     void __fastcall SetDataSet(TDataSet *ADataSet);
  1234.     void __fastcall SetDisplayLabel( System::AnsiString Value);
  1235.     void __fastcall SetDisplayWidth(System::Integer Value);
  1236.     void __fastcall SetEditMask(const System::AnsiString Value);
  1237.     void __fastcall SetEditText(const System::AnsiString Value);
  1238.     void __fastcall SetFieldKind(TFieldKind Value);
  1239.     void __fastcall SetFieldName(const System::AnsiString Value);
  1240.     void __fastcall SetIndex(System::Integer Value);
  1241.     void __fastcall SetLookup(System::Boolean Value);
  1242.     void __fastcall SetLookupDataSet(TDataSet *Value);
  1243.     void __fastcall SetLookupKeyFields(const System::AnsiString Value);
  1244.     void __fastcall SetLookupResultField(const System::AnsiString Value);
  1245.     void __fastcall SetKeyFields(const System::AnsiString Value);
  1246.     void __fastcall SetNewValue(const System::Variant &Value);
  1247.     void __fastcall SetVisible(System::Boolean Value);
  1248.     void __fastcall UpdateDataSize(void);
  1249.     void __fastcall WriteAttributeSet(Classes::TWriter *Writer);
  1250.     
  1251. protected:
  1252.     void __fastcall AccessError(const System::AnsiString TypeName);
  1253.     void __fastcall CheckInactive(void);
  1254.     virtual void __fastcall Change(void);
  1255.     void __fastcall DataChanged(void);
  1256.     virtual void __fastcall DefineProperties(Classes::TFiler *Filer);
  1257.     virtual void __fastcall FreeBuffers(void);
  1258.     virtual System::Boolean __fastcall GetAsBoolean(void);
  1259.     virtual System::Currency __fastcall GetAsCurrency(void);
  1260.     virtual System::TDateTime __fastcall GetAsDateTime(void);
  1261.     virtual System::Double __fastcall GetAsFloat(void);
  1262.     virtual System::Longint __fastcall GetAsInteger(void);
  1263.     virtual System::AnsiString __fastcall GetAsString(void);
  1264.     virtual System::Variant __fastcall GetAsVariant(void);
  1265.     System::Boolean __fastcall GetCanModify(void);
  1266.     virtual System::Integer __fastcall GetDefaultWidth(void);
  1267.     virtual Classes::TComponent *__fastcall GetParentComponent(void);
  1268.     virtual void __fastcall GetText( System::AnsiString &Text, System::Boolean DisplayText);
  1269.     virtual System::Boolean __fastcall HasParent(void);
  1270.     virtual void __fastcall Notification(Classes::TComponent *AComponent, Classes::TOperation Operation
  1271.         );
  1272.     void __fastcall PropertyChanged(System::Boolean LayoutAffected);
  1273.     virtual void __fastcall ReadState(Classes::TReader *Reader);
  1274.     virtual void __fastcall SetAsBoolean(System::Boolean Value);
  1275.     virtual void __fastcall SetAsCurrency(System::Currency Value);
  1276.     virtual void __fastcall SetAsDateTime(System::TDateTime Value);
  1277.     virtual void __fastcall SetAsFloat(System::Double Value);
  1278.     virtual void __fastcall SetAsInteger(System::Longint Value);
  1279.     virtual void __fastcall SetAsString(const System::AnsiString Value);
  1280.     virtual void __fastcall SetAsVariant(const System::Variant &Value);
  1281.     void __fastcall SetDataType(TFieldType Value);
  1282.     void __fastcall SetSize(System::Word Value);
  1283.     virtual void __fastcall SetParentComponent(Classes::TComponent *AParent);
  1284.     virtual void __fastcall SetText(const System::AnsiString Value);
  1285.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  1286.     
  1287. public:
  1288.     __fastcall virtual TField(Classes::TComponent *AOwner);
  1289.     __fastcall virtual ~TField(void);
  1290.     virtual void __fastcall Assign(Classes::TPersistent *Source);
  1291.     void __fastcall AssignValue(const System::TVarRec &Value);
  1292.     virtual void __fastcall Clear(void);
  1293.     void __fastcall FocusControl(void);
  1294.     System::Boolean __fastcall GetData(System::Pointer Buffer);
  1295.     virtual System::Boolean __fastcall IsValidChar(System::Char InputChar);
  1296.     void __fastcall SetData(System::Pointer Buffer);
  1297.     virtual void __fastcall SetFieldType(TFieldType Value);
  1298.     __property System::Boolean AsBoolean = {read=GetAsBoolean, write=SetAsBoolean, nodefault};
  1299.     __property System::Currency AsCurrency = {read=GetAsCurrency, write=SetAsCurrency};
  1300.     __property System::TDateTime AsDateTime = {read=GetAsDateTime, write=SetAsDateTime};
  1301.     __property System::Double AsFloat = {read=GetAsFloat, write=SetAsFloat};
  1302.     __property System::Longint AsInteger = {read=GetAsInteger, write=SetAsInteger, nodefault};
  1303.     __property System::AnsiString AsString = {read=GetAsString, write=SetAsString, nodefault};
  1304.     __property System::Variant AsVariant = {read=GetAsVariant, write=SetAsVariant};
  1305.     __property System::AnsiString AttributeSet = {read=FAttributeSet, write=FAttributeSet, nodefault};
  1306.     __property System::Boolean BDECalcField = {read=GetBDECalcField, nodefault};
  1307.     __property System::Boolean CanModify = {read=GetCanModify, nodefault};
  1308.     __property TDataSet * DataSet = {read=FDataSet, write=SetDataSet, stored=false, nodefault};
  1309.     __property System::Word DataSize = {read=FDataSize, nodefault};
  1310.     __property TFieldType DataType = {read=FDataType, nodefault};
  1311.     __property System::AnsiString DisplayName = {read=GetDisplayName, nodefault};
  1312.     __property System::AnsiString DisplayText = {read=GetDisplayText, nodefault};
  1313.     __property System::AnsiString EditMask = {read=FEditMask, write=SetEditMask, nodefault};
  1314.     __property System::AnsiString EditMaskPtr = {read=FEditMask, nodefault};
  1315.     __property TFieldKind FieldKind = {read=FFieldKind, write=SetFieldKind, nodefault};
  1316.     __property System::Integer FieldNo = {read=FFieldNo, nodefault};
  1317.     __property System::Boolean IsIndexField = {read=GetIsIndexField, nodefault};
  1318.     __property System::Boolean IsNull = {read=GetIsNull, nodefault};
  1319.     __property System::Word Size = {read=FSize, write=SetSize, nodefault};
  1320.     __property System::AnsiString Text = {read=GetEditText, write=SetEditText, nodefault};
  1321.     __property System::Variant Value = {read=GetAsVariant, write=SetAsVariant};
  1322.     __property System::Variant NewValue = {read=GetNewValue, write=SetNewValue};
  1323.     __property System::Variant OldValue = {read=GetOldValue};
  1324.     
  1325. __published:
  1326.     __property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, default=0};
  1327.     __property System::Boolean Calculated = {read=GetCalculated, write=SetCalculated, default=0};
  1328.     __property System::AnsiString DisplayLabel = {read=GetDisplayLabel, write=SetDisplayLabel, stored=IsDisplayLabelStored
  1329.         , nodefault};
  1330.     __property System::Integer DisplayWidth = {read=GetDisplayWidth, write=SetDisplayWidth, stored=IsDisplayWidthStored
  1331.         , nodefault};
  1332.     __property System::AnsiString FieldName = {read=FFieldName, write=SetFieldName, nodefault};
  1333.     __property System::Integer Index = {read=GetIndex, write=SetIndex, stored=false, nodefault};
  1334.     __property System::Boolean Lookup = {read=GetLookup, write=SetLookup, default=0};
  1335.     __property TDataSet * LookupDataSet = {read=FLookupDataSet, write=SetLookupDataSet, nodefault};
  1336.     __property System::AnsiString LookupKeyFields = {read=FLookupKeyFields, write=SetLookupKeyFields, nodefault
  1337.         };
  1338.     __property System::AnsiString LookupResultField = {read=FLookupResultField, write=SetLookupResultField
  1339.         , nodefault};
  1340.     __property System::AnsiString KeyFields = {read=FKeyFields, write=SetKeyFields, nodefault};
  1341.     __property System::Boolean ReadOnly = {read=FReadOnly, write=FReadOnly, default=0};
  1342.     __property System::Boolean Required = {read=FRequired, write=FRequired, default=0};
  1343.     __property System::Boolean Visible = {read=FVisible, write=SetVisible, default=1};
  1344.     __property TFieldNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
  1345.     __property TFieldGetTextEvent OnGetText = {read=FOnGetText, write=FOnGetText};
  1346.     __property TFieldSetTextEvent OnSetText = {read=FOnSetText, write=FOnSetText};
  1347.     __property TFieldNotifyEvent OnValidate = {read=FOnValidate, write=FOnValidate};
  1348. };
  1349.  
  1350. //-- var, const, procedure ---------------------------------------------------
  1351. #define dsMaxBufferCount System::Smallint(1024)
  1352. #define dsMaxStringSize System::Smallint(8192)
  1353. #define smTraceBufSize System::Smallint(8199)
  1354. #define dbfOpened System::Byte(0)
  1355. #define dbfPrepared System::Byte(1)
  1356. #define dbfExecSQL System::Byte(2)
  1357. #define dbfTable System::Byte(3)
  1358. #define dbfFieldList System::Byte(4)
  1359. #define dbfIndexList System::Byte(5)
  1360. #define dbfStoredProc System::Byte(6)
  1361. #define dbfExecProc System::Byte(7)
  1362. #define dbfProcDesc System::Byte(8)
  1363. #define dsEditModes 0x1C
  1364. extern TSession *Session;
  1365. extern TSessionList *Sessions;
  1366. extern void __fastcall (*RegisterFieldsProc)(const TFieldClass *FieldClassess, const System::Integer 
  1367.     FieldClassess_Size);
  1368. extern void __fastcall RegisterBDEInitProc(const TBDEInitProc InitProc);
  1369. extern System::PChar __fastcall AnsiToNative(System::Pointer Locale, const System::AnsiString AnsiStr
  1370.     , System::PChar NativeStr, System::Integer MaxLen);
  1371. extern void __fastcall NativeToAnsi(System::Pointer Locale, System::PChar NativeStr,  System::AnsiString &
  1372.     AnsiStr);
  1373. extern void __fastcall AnsiToNativeBuf(System::Pointer Locale, System::PChar Source, System::PChar Dest
  1374.     , System::Integer Len);
  1375. extern void __fastcall NativeToAnsiBuf(System::Pointer Locale, System::PChar Source, System::PChar Dest
  1376.     , System::Integer Len);
  1377. extern System::Integer __fastcall NativeCompareStr(System::Pointer Locale, const System::AnsiString 
  1378.     S1, const System::AnsiString S2, System::Integer Len);
  1379. extern System::Integer __fastcall NativeCompareStrBuf(System::Pointer Locale, const System::PChar S1
  1380.     , const System::PChar S2, System::Integer Len);
  1381. extern System::Integer __fastcall NativeCompareText(System::Pointer Locale, const System::AnsiString 
  1382.     S1, const System::AnsiString S2, System::Integer Len);
  1383. extern System::Integer __fastcall NativeCompareTextBuf(System::Pointer Locale, const System::PChar S1
  1384.     , const System::PChar S2, System::Integer Len);
  1385. extern System::AnsiString __fastcall ExtractFieldName(const System::AnsiString Fields, System::Integer 
  1386.     &Pos);
  1387. extern void __fastcall RegisterFields(const TFieldClass *FieldClasses, const System::Integer FieldClasses_Size
  1388.     );
  1389. extern void __fastcall DatabaseError(const System::AnsiString Message);
  1390. extern void __fastcall DBError(System::Word Ident);
  1391. extern void __fastcall DBErrorFmt(System::Word Ident, const TVarRec *Args, const System::Integer Args_Size
  1392.     );
  1393. extern void __fastcall DbiError(System::Word ErrorCode);
  1394. extern void __fastcall Check(System::Word Status);
  1395. //-- template instantiations -------------------------------------------------
  1396. template class TDBFlags ;
  1397. template class TResyncMode ;
  1398. template class TUpdateRecordTypes ;
  1399. template class TLocateOptions ;
  1400. template class TFilterOptions ;
  1401. template class TTraceFlags ;
  1402.  
  1403. }    /* namespace Db */
  1404. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  1405. using namespace Db;
  1406. #endif
  1407. //-- end unit ----------------------------------------------------------------
  1408. #endif    // DB
  1409.