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

  1. //----------------------------------------------------------------------------
  2. // DBTables.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
  3. // From: DBTables.pas
  4. //----------------------------------------------------------------------------
  5. #ifndef DBTablesHPP
  6. #define DBTablesHPP
  7. //----------------------------------------------------------------------------
  8. #ifndef DBHPP
  9. #include <DB.hpp>
  10. #endif
  11.  
  12. #ifndef MaskHPP
  13. #include <Mask.hpp>
  14. #endif
  15.  
  16. #ifndef GraphicsHPP
  17. #include <Graphics.hpp>
  18. #endif
  19.  
  20. #ifndef ControlsHPP
  21. #include <Controls.hpp>
  22. #endif
  23.  
  24. #ifndef ClassesHPP
  25. #include <Classes.hpp>
  26. #endif
  27.  
  28. #ifndef BdeHPP
  29. #include <Bde.hpp>
  30. #endif
  31.  
  32. #ifndef WindowsHPP
  33. #include <Windows.hpp>
  34. #endif
  35.  
  36. #ifndef SysUtilsHPP
  37. #include <SysUtils.hpp>
  38. #endif
  39.  
  40. #ifndef SystemHPP
  41. #include <System.hpp>
  42. #endif
  43.  
  44. namespace Dbtables
  45. {
  46. //-- type declarations -------------------------------------------------------
  47. enum DBTables_1 { ixPrimary, ixUnique, ixDescending, ixCaseInsensitive, ixExpression };
  48.  
  49. typedef Set<DBTables_1, ixPrimary, ixExpression>  TIndexOptions;
  50.  
  51. class __declspec(delphiclass) TIndexDef;
  52. class __declspec(delphiclass) TIndexDefs;
  53. class __declspec(delphiclass) TTable;
  54. class __declspec(delphiclass) TTableDataLink;
  55. class __declspec(pascalimplementation) TTableDataLink : public Db::TDataLink
  56. {
  57.     typedef TTableDataLink ThisClass;
  58.     typedef Db::TDataLink inherited;
  59.     
  60. private:
  61.     TTable *FTable;
  62.     System::AnsiString FFieldNames;
  63.     Classes::TList *FFields;
  64.     void __fastcall SetFieldNames(const System::AnsiString Value);
  65.     
  66. protected:
  67.     virtual void __fastcall ActiveChanged(void);
  68.     virtual void __fastcall CheckBrowseMode(void);
  69.     virtual void __fastcall LayoutChanged(void);
  70.     virtual void __fastcall RecordChanged(Db::TField *Field);
  71.     
  72. public:
  73.     __fastcall TTableDataLink(TTable *Table);
  74.     __fastcall virtual ~TTableDataLink(void);
  75. };
  76.  
  77. enum TTableType { ttDefault, ttParadox, ttDBase, ttASCII };
  78.  
  79. typedef System::AnsiString TIndexName;
  80.  
  81. enum TLockType { ltReadLock, ltWriteLock };
  82.  
  83. enum TBatchMode { batAppend, batUpdate, batAppendUpdate, batDelete, batCopy };
  84.  
  85. class __declspec(pascalimplementation) TTable : public Db::TDBDataSet
  86. {
  87.     typedef TTable ThisClass;
  88.     typedef Db::TDBDataSet inherited;
  89.     
  90. private:
  91.     TIndexDefs *FIndexDefs;
  92.     TTableDataLink *FDataLink;
  93.     System::Boolean FExclusive;
  94.     System::Boolean FReadOnly;
  95.     TTableType FTableType;
  96.     System::Boolean FFieldsIndex;
  97.     System::AnsiString FTableName;
  98.     System::AnsiString FIndexName;
  99.     Classes::TStrings *FIndexFiles;
  100.     Bde::_hDBIObj *FLookupHandle;
  101.     System::AnsiString FLookupKeyFields;
  102.     Bde::_hDBIObj *FLookupCursor;
  103.     void __fastcall DecodeIndexDesc(const Bde::IDXDesc &IndexDesc,  System::AnsiString &Source,  System::AnsiString &
  104.         Name,  System::AnsiString &Fields,  TIndexOptions *Options);
  105.     void __fastcall EncodeFieldDesc(Bde::FLDDesc &FieldDesc, const System::AnsiString Name, Db::TFieldType 
  106.         DataType, System::Word Size);
  107.     void __fastcall EncodeIndexDesc(Bde::IDXDesc &IndexDesc, const System::AnsiString Name, const System::AnsiString 
  108.         Fields,  TIndexOptions Options);
  109.     System::PChar __fastcall GetDriverTypeName(System::PChar Buffer);
  110.     System::AnsiString __fastcall GetIndexFieldNames(void);
  111.     System::AnsiString __fastcall GetIndexName(void);
  112.     void __fastcall GetIndexParams(const System::AnsiString IndexName, System::Boolean FieldsIndex,  System::AnsiString &
  113.         IndexedName,  System::AnsiString &IndexTag);
  114.     System::AnsiString __fastcall GetMasterFields(void);
  115.     System::PChar __fastcall GetTableTypeName(void);
  116.     System::Boolean __fastcall IsDBaseTable(void);
  117.     void __fastcall MasterChanged(void);
  118.     void __fastcall SetDataSource(Db::TDataSource *Value);
  119.     void __fastcall SetExclusive(System::Boolean Value);
  120.     void __fastcall SetIndex(const System::AnsiString Value, System::Boolean FieldsIndex);
  121.     void __fastcall SetIndexFieldNames(const System::AnsiString Value);
  122.     void __fastcall SetIndexFiles(Classes::TStrings *Value);
  123.     void __fastcall SetIndexName(const System::AnsiString Value);
  124.     void __fastcall SetMasterFields(const System::AnsiString Value);
  125.     void __fastcall SetReadOnly(System::Boolean Value);
  126.     void __fastcall SetTableLock(TLockType LockType, System::Boolean Lock);
  127.     void __fastcall SetTableName(const System::AnsiString Value);
  128.     void __fastcall SetTableType(TTableType Value);
  129.     void __fastcall UpdateIndexDefs(void);
  130.     void __fastcall UpdateRange(void);
  131.     
  132. protected:
  133.     virtual Bde::hDBICur __fastcall CreateHandle(void);
  134.     virtual void __fastcall DataEvent(Db::TDataEvent Event, System::Longint Info);
  135.     virtual void __fastcall DestroyHandle(void);
  136.     virtual void __fastcall DestroyLookupCursor(void);
  137.     virtual void __fastcall DoOnNewRecord(void);
  138.     virtual System::Boolean __fastcall GetCanModify(void);
  139.     virtual Db::TDataSource *__fastcall GetDataSource(void);
  140.     Bde::hDBICur __fastcall GetHandle(const System::AnsiString IndexName, const System::AnsiString IndexTag
  141.         );
  142.     System::AnsiString __fastcall GetLanguageDriverName(void);
  143.     virtual Bde::hDBICur __fastcall GetLookupCursor(const System::AnsiString KeyFields, System::Boolean 
  144.         CaseInsensitive);
  145.     virtual void __fastcall InitFieldDefs(void);
  146.     System::Boolean __fastcall IsProductionIndex(const System::AnsiString IndexName);
  147.     virtual void __fastcall PrepareCursor(void);
  148.     
  149. public:
  150.     __fastcall virtual TTable(Classes::TComponent *AOwner);
  151.     __fastcall virtual ~TTable(void);
  152.     System::Longint __fastcall BatchMove(Db::TDataSet *ASource, TBatchMode AMode);
  153.     void __fastcall AddIndex(const System::AnsiString Name, const System::AnsiString Fields,  TIndexOptions 
  154.         Options);
  155.     void __fastcall ApplyRange(void);
  156.     void __fastcall CancelRange(void);
  157.     void __fastcall CloseIndexFile(const System::AnsiString IndexFileName);
  158.     void __fastcall CreateTable(void);
  159.     void __fastcall DeleteIndex(const System::AnsiString Name);
  160.     void __fastcall DeleteTable(void);
  161.     void __fastcall EditKey(void);
  162.     void __fastcall EditRangeEnd(void);
  163.     void __fastcall EditRangeStart(void);
  164.     void __fastcall EmptyTable(void);
  165.     System::Boolean __fastcall FindKey(const TVarRec *KeyValues, const System::Integer KeyValues_Size);
  166.         
  167.     void __fastcall FindNearest(const TVarRec *KeyValues, const System::Integer KeyValues_Size);
  168.     void __fastcall GetIndexNames(Classes::TStrings *List);
  169.     void __fastcall GotoCurrent(TTable *Table);
  170.     System::Boolean __fastcall GotoKey(void);
  171.     void __fastcall GotoNearest(void);
  172.     void __fastcall LockTable(TLockType LockType);
  173.     void __fastcall OpenIndexFile(const System::AnsiString IndexName);
  174.     void __fastcall RenameTable(const System::AnsiString NewTableName);
  175.     void __fastcall SetKey(void);
  176.     void __fastcall SetRange(const TVarRec *StartValues, const System::Integer StartValues_Size, const 
  177.         TVarRec *EndValues, const System::Integer EndValues_Size);
  178.     void __fastcall SetRangeEnd(void);
  179.     void __fastcall SetRangeStart(void);
  180.     void __fastcall UnlockTable(TLockType LockType);
  181.     __property TIndexDefs * IndexDefs = {read=FIndexDefs, nodefault};
  182.     __property System::Integer IndexFieldCount = {read=GetIndexFieldCount, nodefault};
  183.     __property Db::TField * IndexFields[System::Integer Index] = {read=GetIndexField, write=SetIndexField
  184.         };
  185.     __property System::Boolean KeyExclusive = {read=GetKeyExclusive, write=SetKeyExclusive, nodefault};
  186.         
  187.     __property System::Integer KeyFieldCount = {read=GetKeyFieldCount, write=SetKeyFieldCount, nodefault
  188.         };
  189.     
  190. __published:
  191.     __property System::Boolean Exclusive = {read=FExclusive, write=SetExclusive, default=0};
  192.     __property System::AnsiString IndexFieldNames = {read=GetIndexFieldNames, write=SetIndexFieldNames, 
  193.         nodefault};
  194.     __property Classes::TStrings * IndexFiles = {read=FIndexFiles, write=SetIndexFiles, nodefault};
  195.     __property System::AnsiString IndexName = {read=GetIndexName, write=SetIndexName, nodefault};
  196.     __property System::AnsiString MasterFields = {read=GetMasterFields, write=SetMasterFields, nodefault
  197.         };
  198.     __property Db::TDataSource * MasterSource = {read=GetDataSource, write=SetDataSource, nodefault};
  199.     __property System::Boolean ReadOnly = {read=FReadOnly, write=SetReadOnly, default=0};
  200.     __property System::AnsiString TableName = {read=FTableName, write=SetTableName, nodefault};
  201.     __property TTableType TableType = {read=FTableType, write=SetTableType, default=0};
  202.     __property UpdateMode ;
  203.     __property UpdateObject ;
  204. };
  205.  
  206. class __declspec(pascalimplementation) TIndexDefs : public System::TObject
  207. {
  208.     typedef TIndexDefs ThisClass;
  209.     typedef System::TObject inherited;
  210.     
  211. private:
  212.     TTable *FTable;
  213.     Classes::TList *FItems;
  214.     System::Boolean FUpdated;
  215.     System::Byte FReserved;
  216.     System::Integer __fastcall GetCount(void);
  217.     TIndexDef *__fastcall GetIndexForFields(const System::AnsiString Fields, System::Boolean CaseInsensitive
  218.         );
  219.     TIndexDef *__fastcall GetItem(System::Integer Index);
  220.     
  221. public:
  222.     __fastcall TIndexDefs(TTable *Table);
  223.     __fastcall virtual ~TIndexDefs(void);
  224.     void __fastcall Add(const System::AnsiString Name, const System::AnsiString Fields,  TIndexOptions 
  225.         Options);
  226.     void __fastcall Assign(TIndexDefs *IndexDefs);
  227.     void __fastcall Clear(void);
  228.     TIndexDef *__fastcall FindIndexForFields(const System::AnsiString Fields);
  229.     System::Integer __fastcall IndexOf(const System::AnsiString Name);
  230.     void __fastcall Update(void);
  231.     __property System::Integer Count = {read=GetCount, nodefault};
  232.     __property TIndexDef * Items[System::Integer Index] = {read=GetItem/*, default*/};
  233. };
  234.  
  235. class __declspec(pascalimplementation) TIndexDef : public System::TObject
  236. {
  237.     typedef TIndexDef ThisClass;
  238.     typedef System::TObject inherited;
  239.     
  240. private:
  241.     TIndexDefs *FOwner;
  242.     System::AnsiString FSource;
  243.     System::AnsiString FName;
  244.     System::AnsiString FFields;
  245.     TIndexOptions FOptions;
  246.     System::AnsiString __fastcall GetExpression(void);
  247.     System::AnsiString __fastcall GetFields(void);
  248.     
  249. public:
  250.     __fastcall TIndexDef(TIndexDefs *Owner, const System::AnsiString Name, const System::AnsiString Fields
  251.         ,  TIndexOptions Options);
  252.     __fastcall virtual ~TIndexDef(void);
  253.     __property System::AnsiString Expression = {read=GetExpression, nodefault};
  254.     __property System::AnsiString Fields = {read=GetFields, nodefault};
  255.     __property System::AnsiString Name = {read=FName, nodefault};
  256.     __property TIndexOptions Options = {read=FOptions, nodefault};
  257.     __property System::AnsiString Source = {read=FSource, nodefault};
  258. };
  259.  
  260. class __declspec(delphiclass) TIndexFiles;
  261. class __declspec(pascalimplementation) TIndexFiles : public Classes::TStringList
  262. {
  263.     typedef TIndexFiles ThisClass;
  264.     typedef Classes::TStringList inherited;
  265.     
  266. private:
  267.     TTable *FOwner;
  268.     
  269. public:
  270.     __fastcall TIndexFiles(TTable *AOwner);
  271.     virtual System::Integer __fastcall Add(const System::AnsiString S);
  272.     virtual void __fastcall Clear(void);
  273.     virtual void __fastcall Delete(System::Integer Index);
  274.     virtual void __fastcall Insert(System::Integer Index, const System::AnsiString S);
  275. public:
  276.     /* !! TStringList.Destroy */ __fastcall virtual ~TIndexFiles(void) { }
  277.     
  278. };
  279.  
  280. class __declspec(delphiclass) TBatchMove;
  281. class __declspec(pascalimplementation) TBatchMove : public Classes::TComponent
  282. {
  283.     typedef TBatchMove ThisClass;
  284.     typedef Classes::TComponent inherited;
  285.     
  286. private:
  287.     TTable *FDestination;
  288.     Db::TDataSet *FSource;
  289.     TBatchMode FMode;
  290.     System::Boolean FAbortOnKeyViol;
  291.     System::Boolean FAbortOnProblem;
  292.     System::Boolean FTransliterate;
  293.     System::Longint FRecordCount;
  294.     System::Longint FMovedCount;
  295.     System::Longint FKeyViolCount;
  296.     System::Longint FProblemCount;
  297.     System::Longint FChangedCount;
  298.     Classes::TStrings *FMappings;
  299.     System::AnsiString FKeyViolTableName;
  300.     System::AnsiString FProblemTableName;
  301.     System::AnsiString FChangedTableName;
  302.     System::Integer FCommitCount;
  303.     System::PChar __fastcall ConvertName(const System::AnsiString Name, System::PChar Buffer);
  304.     void __fastcall SetDesination(TTable *Value);
  305.     void __fastcall SetMappings(Classes::TStrings *Value);
  306.     void __fastcall SetSource(Db::TDataSet *Value);
  307.     
  308. protected:
  309.     virtual void __fastcall Notification(Classes::TComponent *AComponent, Classes::TOperation Operation
  310.         );
  311.     
  312. public:
  313.     __fastcall virtual TBatchMove(Classes::TComponent *AOwner);
  314.     __fastcall virtual ~TBatchMove(void);
  315.     void __fastcall Execute(void);
  316.     __property System::Longint ChangedCount = {read=FChangedCount, nodefault};
  317.     __property System::Longint KeyViolCount = {read=FKeyViolCount, nodefault};
  318.     __property System::Longint MovedCount = {read=FMovedCount, nodefault};
  319.     __property System::Longint ProblemCount = {read=FProblemCount, nodefault};
  320.     
  321. __published:
  322.     __property System::Boolean AbortOnKeyViol = {read=FAbortOnKeyViol, write=FAbortOnKeyViol, default=1
  323.         };
  324.     __property System::Boolean AbortOnProblem = {read=FAbortOnProblem, write=FAbortOnProblem, default=1
  325.         };
  326.     __property System::Integer CommitCount = {read=FCommitCount, write=FCommitCount, default=0};
  327.     __property System::AnsiString ChangedTableName = {read=FChangedTableName, write=FChangedTableName, 
  328.         nodefault};
  329.     __property TTable * Destination = {read=FDestination, write=FDestination, nodefault};
  330.     __property System::AnsiString KeyViolTableName = {read=FKeyViolTableName, write=FKeyViolTableName, 
  331.         nodefault};
  332.     __property Classes::TStrings * Mappings = {read=FMappings, write=SetMappings, nodefault};
  333.     __property TBatchMode Mode = {read=FMode, write=FMode, default=0};
  334.     __property System::AnsiString ProblemTableName = {read=FProblemTableName, write=FProblemTableName, 
  335.         nodefault};
  336.     __property System::Longint RecordCount = {read=FRecordCount, write=FRecordCount, default=0};
  337.     __property Db::TDataSet * Source = {read=FSource, write=SetSource, nodefault};
  338.     __property System::Boolean Transliterate = {read=FTransliterate, write=FTransliterate, default=1};
  339. };
  340.  
  341. enum TParamType { ptUnknown, ptInput, ptOutput, ptInputOutput, ptResult };
  342.  
  343. class __declspec(delphiclass) TParam;
  344. class __declspec(delphiclass) TParams;
  345. class __declspec(pascalimplementation) TParams : public Classes::TPersistent
  346. {
  347.     typedef TParams ThisClass;
  348.     typedef Classes::TPersistent inherited;
  349.     
  350. private:
  351.     Classes::TList *FItems;
  352.     TParam *__fastcall GetParam(System::Word Index);
  353.     System::Variant __fastcall GetParamValue(const System::AnsiString ParamName);
  354.     System::Word __fastcall GetVersion(void);
  355.     void __fastcall ReadBinaryData(Classes::TStream *Stream);
  356.     void __fastcall SetParamValue(const System::AnsiString ParamName, const System::Variant &Value);
  357.     void __fastcall WriteBinaryData(Classes::TStream *Stream);
  358.     
  359. protected:
  360.     virtual void __fastcall AssignTo(Classes::TPersistent *Dest);
  361.     virtual void __fastcall DefineProperties(Classes::TFiler *Filer);
  362.     
  363. public:
  364.     __fastcall virtual TParams(void);
  365.     __fastcall virtual ~TParams(void);
  366.     virtual void __fastcall Assign(Classes::TPersistent *Source);
  367.     void __fastcall AssignValues(TParams *Value);
  368.     void __fastcall AddParam(TParam *Value);
  369.     void __fastcall RemoveParam(TParam *Value);
  370.     TParam *__fastcall CreateParam(Db::TFieldType FldType, const System::AnsiString ParamName, TParamType 
  371.         ParamType);
  372.     System::Integer __fastcall Count(void);
  373.     void __fastcall Clear(void);
  374.     void __fastcall GetParamList(Classes::TList *List, const System::AnsiString ParamNames);
  375.     System::Boolean __fastcall IsEqual(TParams *Value);
  376.     TParam *__fastcall ParamByName(const System::AnsiString Value);
  377.     __property TParam * Items[System::Word Index] = {read=GetParam/*, default*/};
  378.     __property System::Variant ParamValues[System::AnsiString ParamName] = {read=GetParamValue, write=SetParamValue
  379.         };
  380. };
  381.  
  382. class __declspec(pascalimplementation) TParam : public System::TObject
  383. {
  384.     typedef TParam ThisClass;
  385.     typedef System::TObject inherited;
  386.     
  387. private:
  388.     TParams *FParamList;
  389.     System::Variant FData;
  390.     System::AnsiString FName;
  391.     TFieldType FDataType;
  392.     System::Boolean FNull;
  393.     System::Boolean FBound;
  394.     TParamType FParamType;
  395.     void __fastcall AccessError(void);
  396.     void __fastcall InitValue(void);
  397.     
  398. protected:
  399.     System::Currency __fastcall GetAsBCD(void);
  400.     System::Boolean __fastcall GetAsBoolean(void);
  401.     System::TDateTime __fastcall GetAsDateTime(void);
  402.     System::Double __fastcall GetAsFloat(void);
  403.     System::Longint __fastcall GetAsInteger(void);
  404.     System::AnsiString __fastcall GetAsString(void);
  405.     System::Variant __fastcall GetAsVariant(void);
  406.     System::Boolean __fastcall IsEqual(TParam *Value);
  407.     void __fastcall SetAsBCD(System::Currency Value);
  408.     void __fastcall SetAsBoolean(System::Boolean Value);
  409.     void __fastcall SetAsCurrency(System::Double Value);
  410.     void __fastcall SetAsDate(System::TDateTime Value);
  411.     void __fastcall SetAsDateTime(System::TDateTime Value);
  412.     void __fastcall SetAsFloat(System::Double Value);
  413.     void __fastcall SetAsInteger(System::Longint Value);
  414.     void __fastcall SetAsString(const System::AnsiString Value);
  415.     void __fastcall SetAsSmallInt(System::Longint Value);
  416.     void __fastcall SetAsTime(System::TDateTime Value);
  417.     void __fastcall SetAsVariant(const System::Variant &Value);
  418.     void __fastcall SetAsWord(System::Longint Value);
  419.     void __fastcall SetDataType(Db::TFieldType Value);
  420.     void __fastcall SetText(const System::AnsiString Value);
  421.     
  422. public:
  423.     __fastcall TParam(TParams *AParamList, TParamType AParamType);
  424.     __fastcall virtual ~TParam(void);
  425.     void __fastcall Assign(TParam *Param);
  426.     void __fastcall AssignField(Db::TField *Field);
  427.     void __fastcall AssignFieldValue(Db::TField *Field, const System::Variant &Value);
  428.     void __fastcall Clear(void);
  429.     void __fastcall GetData(System::Pointer Buffer);
  430.     System::Word __fastcall GetDataSize(void);
  431.     void __fastcall SetData(System::Pointer Buffer);
  432.     __property System::Currency AsBCD = {read=GetAsBCD, write=SetAsBCD};
  433.     __property System::Boolean AsBoolean = {read=GetAsBoolean, write=SetAsBoolean, nodefault};
  434.     __property System::Double AsCurrency = {read=GetAsFloat, write=SetAsCurrency};
  435.     __property System::TDateTime AsDate = {read=GetAsDateTime, write=SetAsDate};
  436.     __property System::TDateTime AsDateTime = {read=GetAsDateTime, write=SetAsDateTime};
  437.     __property System::Double AsFloat = {read=GetAsFloat, write=SetAsFloat};
  438.     __property System::Longint AsInteger = {read=GetAsInteger, write=SetAsInteger, nodefault};
  439.     __property System::Longint AsSmallInt = {read=GetAsInteger, write=SetAsSmallInt, nodefault};
  440.     __property System::AnsiString AsString = {read=GetAsString, write=SetAsString, nodefault};
  441.     __property System::TDateTime AsTime = {read=GetAsDateTime, write=SetAsTime};
  442.     __property System::Longint AsWord = {read=GetAsInteger, write=SetAsWord, nodefault};
  443.     __property System::Boolean Bound = {read=FBound, write=FBound, nodefault};
  444.     __property Db::TFieldType DataType = {read=FDataType, write=SetDataType, nodefault};
  445.     __property System::Boolean IsNull = {read=FNull, nodefault};
  446.     __property System::AnsiString Name = {read=FName, write=FName, nodefault};
  447.     __property TParamType ParamType = {read=FParamType, write=FParamType, nodefault};
  448.     __property System::AnsiString Text = {read=GetAsString, write=SetText, nodefault};
  449.     __property System::Variant Value = {read=GetAsVariant, write=SetAsVariant};
  450. };
  451.  
  452. struct TServerDesc;
  453. typedef TServerDesc *PServerDesc;
  454.  
  455. struct TServerDesc
  456. {
  457.     SmallString<64>  ParamName;
  458.     TFieldType BindType;
  459. } ;
  460.  
  461. enum TParamBindMode { pbByName, pbByNumber };
  462.  
  463. class __declspec(delphiclass) TStoredProc;
  464. class __declspec(pascalimplementation) TStoredProc : public Db::TDBDataSet
  465. {
  466.     typedef TStoredProc ThisClass;
  467.     typedef Db::TDBDataSet inherited;
  468.     
  469. private:
  470.     Bde::_hDBIObj *FStmtHandle;
  471.     System::AnsiString FProcName;
  472.     TParams *FParams;
  473.     System::Char *FParamDesc;
  474.     System::Char *FRecordBuffer;
  475.     System::Word FOverLoad;
  476.     System::Boolean FPrepared;
  477.     System::Boolean FQueryMode;
  478.     System::Char *FServerDescs;
  479.     TParamBindMode FBindMode;
  480.     void __fastcall BindParams(void);
  481.     System::Boolean __fastcall CheckServerParams(void);
  482.     Bde::hDBICur __fastcall CreateCursor(System::Boolean GenHandle);
  483.     void __fastcall CreateParamDesc(void);
  484.     void __fastcall FreeStatement(void);
  485.     Bde::hDBICur __fastcall GetCursor(System::Boolean GenHandle);
  486.     void __fastcall PrepareProc(void);
  487.     void __fastcall SetParamsList(TParams *Value);
  488.     void __fastcall SetServerParams(void);
  489.     
  490. protected:
  491.     virtual Bde::hDBICur __fastcall CreateHandle(void);
  492.     virtual void __fastcall Disconnect(void);
  493.     System::Word __fastcall GetParamsCount(void);
  494.     virtual void __fastcall SetDBFlag(System::Integer Flag, System::Boolean Value);
  495.     void __fastcall SetOverLoad(System::Word Value);
  496.     void __fastcall SetProcName(const System::AnsiString Value);
  497.     void __fastcall SetPrepared(System::Boolean Value);
  498.     void __fastcall SetPrepare(System::Boolean Value);
  499.     
  500. public:
  501.     __fastcall virtual TStoredProc(Classes::TComponent *AOwner);
  502.     __fastcall virtual ~TStoredProc(void);
  503.     void __fastcall CopyParams(TParams *Value);
  504.     System::Boolean __fastcall DescriptionsAvailable(void);
  505.     void __fastcall ExecProc(void);
  506.     TParam *__fastcall ParamByName(const System::AnsiString Value);
  507.     void __fastcall Prepare(void);
  508.     void __fastcall GetResults(void);
  509.     void __fastcall UnPrepare(void);
  510.     __property System::Word ParamCount = {read=GetParamsCount, nodefault};
  511.     __property Bde::hDBIStmt StmtHandle = {read=FStmtHandle, nodefault};
  512.     __property System::Boolean Prepared = {read=FPrepared, write=SetPrepare, nodefault};
  513.     
  514. __published:
  515.     __property System::AnsiString StoredProcName = {read=FProcName, write=SetProcName, nodefault};
  516.     __property System::Word Overload = {read=FOverLoad, write=SetOverLoad, default=0};
  517.     __property TParams * Params = {read=FParams, write=SetParamsList, nodefault};
  518.     __property TParamBindMode ParamBindMode = {read=FBindMode, write=FBindMode, default=0};
  519.     __property UpdateObject ;
  520. };
  521.  
  522. class __declspec(delphiclass) TQuery;
  523. class __declspec(pascalimplementation) TQuery : public Db::TDBDataSet
  524. {
  525.     typedef TQuery ThisClass;
  526.     typedef Db::TDBDataSet inherited;
  527.     
  528. private:
  529.     Bde::_hDBIObj *FStmtHandle;
  530.     Classes::TStrings *FSQL;
  531.     System::Boolean FPrepared;
  532.     TParams *FParams;
  533.     System::AnsiString FText;
  534.     Db::TDataLink *FDataLink;
  535.     System::Boolean FLocal;
  536.     System::Integer FRowsAffected;
  537.     System::Boolean FUniDirectional;
  538.     System::Boolean FRequestLive;
  539.     System::Char *FSQLBinary;
  540.     System::Boolean FConstrained;
  541.     System::Boolean FParamCheck;
  542.     Bde::hDBICur __fastcall CreateCursor(System::Boolean GenHandle);
  543.     void __fastcall CreateParams(TParams *List, const System::PChar Value);
  544.     virtual void __fastcall DefineProperties(Classes::TFiler *Filer);
  545.     void __fastcall FreeStatement(void);
  546.     Bde::hDBICur __fastcall GetQueryCursor(System::Boolean GenHandle);
  547.     void __fastcall GetStatementHandle(System::PChar SQLText);
  548.     System::PChar __fastcall GetSQLText(void);
  549.     System::Integer __fastcall GetRowsAffected(void);
  550.     void __fastcall PrepareSQL(System::PChar Value);
  551.     void __fastcall QueryChanged(System::TObject *Sender);
  552.     void __fastcall ReadBinaryData(Classes::TStream *Stream);
  553.     void __fastcall RefreshParams(void);
  554.     void __fastcall SetDataSource(Db::TDataSource *Value);
  555.     void __fastcall SetQuery(Classes::TStrings *Value);
  556.     void __fastcall SetParamsList(TParams *Value);
  557.     void __fastcall SetParams(void);
  558.     void __fastcall SetParamsFromCursor(void);
  559.     void __fastcall SetPrepared(System::Boolean Value);
  560.     void __fastcall SetPrepare(System::Boolean Value);
  561.     void __fastcall WriteBinaryData(Classes::TStream *Stream);
  562.     
  563. protected:
  564.     virtual Bde::hDBICur __fastcall CreateHandle(void);
  565.     virtual void __fastcall Disconnect(void);
  566.     virtual Db::TDataSource *__fastcall GetDataSource(void);
  567.     System::Word __fastcall GetParamsCount(void);
  568.     virtual void __fastcall SetDBFlag(System::Integer Flag, System::Boolean Value);
  569.     
  570. public:
  571.     __fastcall virtual TQuery(Classes::TComponent *AOwner);
  572.     __fastcall virtual ~TQuery(void);
  573.     void __fastcall ExecSQL(void);
  574.     TParam *__fastcall ParamByName(const System::AnsiString Value);
  575.     void __fastcall Prepare(void);
  576.     void __fastcall UnPrepare(void);
  577.     __property System::Boolean Prepared = {read=FPrepared, write=SetPrepare, nodefault};
  578.     __property System::Word ParamCount = {read=GetParamsCount, nodefault};
  579.     __property System::Boolean Local = {read=FLocal, nodefault};
  580.     __property Bde::hDBIStmt StmtHandle = {read=FStmtHandle, nodefault};
  581.     __property System::AnsiString Text = {read=FText, nodefault};
  582.     __property System::Integer RowsAffected = {read=GetRowsAffected, nodefault};
  583.     __property System::PChar SQLBinary = {read=FSQLBinary, write=FSQLBinary, nodefault};
  584.     
  585. __published:
  586.     __property System::Boolean Constrained = {read=FConstrained, write=FConstrained, default=0};
  587.     __property Db::TDataSource * DataSource = {read=GetDataSource, write=SetDataSource, nodefault};
  588.     __property TParams * Params = {read=FParams, write=SetParamsList, nodefault};
  589.     __property System::Boolean ParamCheck = {read=FParamCheck, write=FParamCheck, default=1};
  590.     __property System::Boolean RequestLive = {read=FRequestLive, write=FRequestLive, default=0};
  591.     __property Classes::TStrings * SQL = {read=FSQL, write=SetQuery, nodefault};
  592.     __property System::Boolean UniDirectional = {read=FUniDirectional, write=FUniDirectional, default=0
  593.         };
  594.     __property UpdateMode ;
  595.     __property UpdateObject ;
  596. };
  597.  
  598. class __declspec(delphiclass) TUpdateSQL;
  599. class __declspec(pascalimplementation) TUpdateSQL : public Db::TDataSetUpdateObject
  600. {
  601.     typedef TUpdateSQL ThisClass;
  602.     typedef Db::TDataSetUpdateObject inherited;
  603.     
  604. private:
  605.     Db::TDataSet *FDataSet;
  606.     TQuery *FQueries[3];
  607.     Classes::TStrings *FSQLText[3];
  608.     TQuery *__fastcall GetQuery(Db::TUpdateKind UpdateKind);
  609.     Classes::TStrings *__fastcall GetSQL(Db::TUpdateKind UpdateKind);
  610.     Classes::TStrings *__fastcall GetSQLIndex(System::Integer Index);
  611.     void __fastcall SetSQL(Db::TUpdateKind UpdateKind, Classes::TStrings *Value);
  612.     void __fastcall SetSQLIndex(System::Integer Index, Classes::TStrings *Value);
  613.     
  614. protected:
  615.     virtual Db::TDataSet *__fastcall GetDataSet(void);
  616.     virtual void __fastcall SetDataSet(Db::TDataSet *ADataSet);
  617.     
  618. public:
  619.     __fastcall virtual TUpdateSQL(Classes::TComponent *AOwner);
  620.     __fastcall virtual ~TUpdateSQL(void);
  621.     virtual void __fastcall Apply(Db::TUpdateKind UpdateKind);
  622.     void __fastcall ExecSQL(Db::TUpdateKind UpdateKind);
  623.     void __fastcall SetParams(Db::TUpdateKind UpdateKind);
  624.     __property DataSet ;
  625.     __property TQuery * Query[Db::TUpdateKind UpdateKind] = {read=GetQuery};
  626.     __property Classes::TStrings * SQL[Db::TUpdateKind UpdateKind] = {read=GetSQL, write=SetSQL};
  627.     
  628. __published:
  629.     __property Classes::TStrings * ModifySQL = {read=GetSQLIndex, write=SetSQLIndex, index=0, nodefault
  630.         };
  631.     __property Classes::TStrings * InsertSQL = {read=GetSQLIndex, write=SetSQLIndex, index=1, nodefault
  632.         };
  633.     __property Classes::TStrings * DeleteSQL = {read=GetSQLIndex, write=SetSQLIndex, index=2, nodefault
  634.         };
  635. };
  636.  
  637. class __declspec(delphiclass) TStringField;
  638. class __declspec(pascalimplementation) TStringField : public Db::TField
  639. {
  640.     typedef TStringField ThisClass;
  641.     typedef Db::TField inherited;
  642.     
  643. private:
  644.     System::Boolean FTransliterate;
  645.     System::Byte FReserved;
  646.     
  647. protected:
  648.     virtual System::Boolean __fastcall GetAsBoolean(void);
  649.     virtual System::TDateTime __fastcall GetAsDateTime(void);
  650.     virtual System::Double __fastcall GetAsFloat(void);
  651.     virtual System::Longint __fastcall GetAsInteger(void);
  652.     virtual System::AnsiString __fastcall GetAsString(void);
  653.     virtual System::Variant __fastcall GetAsVariant(void);
  654.     virtual System::Integer __fastcall GetDefaultWidth(void);
  655.     virtual void __fastcall GetText( System::AnsiString &Text, System::Boolean DisplayText);
  656.     System::Boolean __fastcall GetValue( System::AnsiString &Value);
  657.     virtual void __fastcall SetAsBoolean(System::Boolean Value);
  658.     virtual void __fastcall SetAsDateTime(System::TDateTime Value);
  659.     virtual void __fastcall SetAsFloat(System::Double Value);
  660.     virtual void __fastcall SetAsInteger(System::Longint Value);
  661.     virtual void __fastcall SetAsString(const System::AnsiString Value);
  662.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  663.     
  664. public:
  665.     __fastcall virtual TStringField(Classes::TComponent *AOwner);
  666.     __property System::AnsiString Value = {read=GetAsString, write=SetAsString, nodefault};
  667.     
  668. __published:
  669.     __property EditMask ;
  670.     __property Size ;
  671.     __property System::Boolean Transliterate = {read=FTransliterate, write=FTransliterate, default=1};
  672. public:
  673.         
  674.     /* !! TField.Destroy */ __fastcall virtual ~TStringField(void) { }
  675.     
  676. };
  677.  
  678. class __declspec(delphiclass) TNumericField;
  679. class __declspec(pascalimplementation) TNumericField : public Db::TField
  680. {
  681.     typedef TNumericField ThisClass;
  682.     typedef Db::TField inherited;
  683.     
  684. private:
  685.     System::AnsiString FDisplayFormat;
  686.     System::AnsiString FEditFormat;
  687.     void __fastcall RangeError(System::Extended Value, System::Extended Min, System::Extended Max);
  688.     void __fastcall SetDisplayFormat(const System::AnsiString Value);
  689.     void __fastcall SetEditFormat(const System::AnsiString Value);
  690.     
  691. public:
  692.     __fastcall virtual TNumericField(Classes::TComponent *AOwner);
  693.     
  694. __published:
  695.     __property Alignment ;
  696.     __property System::AnsiString DisplayFormat = {read=FDisplayFormat, write=SetDisplayFormat, nodefault
  697.         };
  698.     __property System::AnsiString EditFormat = {read=FEditFormat, write=SetEditFormat, nodefault};
  699. public:
  700.         
  701.     /* !! TField.Destroy */ __fastcall virtual ~TNumericField(void) { }
  702.     
  703. };
  704.  
  705. class __declspec(delphiclass) TIntegerField;
  706. class __declspec(pascalimplementation) TIntegerField : public TNumericField
  707. {
  708.     typedef TIntegerField ThisClass;
  709.     typedef TNumericField inherited;
  710.     
  711. private:
  712.     System::Longint FMinRange;
  713.     System::Longint FMaxRange;
  714.     System::Longint FMinValue;
  715.     System::Longint FMaxValue;
  716.     void __fastcall CheckRange(System::Longint Value, System::Longint Min, System::Longint Max);
  717.     void __fastcall SetMaxValue(System::Longint Value);
  718.     void __fastcall SetMinValue(System::Longint Value);
  719.     
  720. protected:
  721.     virtual System::Double __fastcall GetAsFloat(void);
  722.     virtual System::Longint __fastcall GetAsInteger(void);
  723.     virtual System::AnsiString __fastcall GetAsString(void);
  724.     virtual System::Variant __fastcall GetAsVariant(void);
  725.     virtual void __fastcall GetText( System::AnsiString &Text, System::Boolean DisplayText);
  726.     System::Boolean __fastcall GetValue(System::Longint &Value);
  727.     virtual void __fastcall SetAsFloat(System::Double Value);
  728.     virtual void __fastcall SetAsInteger(System::Longint Value);
  729.     virtual void __fastcall SetAsString(const System::AnsiString Value);
  730.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  731.     
  732. public:
  733.     __fastcall virtual TIntegerField(Classes::TComponent *AOwner);
  734.     virtual System::Boolean __fastcall IsValidChar(System::Char Ch);
  735.     __property System::Longint Value = {read=GetAsInteger, write=SetAsInteger, nodefault};
  736.     
  737. __published:
  738.     __property System::Longint MaxValue = {read=FMaxValue, write=SetMaxValue, default=0};
  739.     __property System::Longint MinValue = {read=FMinValue, write=SetMinValue, default=0};
  740. public:
  741.     /* !! TField.Destroy */ __fastcall virtual ~TIntegerField(void) { }
  742.     
  743. };
  744.  
  745. class __declspec(delphiclass) TSmallintField;
  746. class __declspec(pascalimplementation) TSmallintField : public TIntegerField
  747. {
  748.     typedef TSmallintField ThisClass;
  749.     typedef TIntegerField inherited;
  750.     
  751. public:
  752.     __fastcall virtual TSmallintField(Classes::TComponent *AOwner);
  753. public:
  754.     /* !! TField.Destroy */ __fastcall virtual ~TSmallintField(void) { }
  755.     
  756. };
  757.  
  758. class __declspec(delphiclass) TWordField;
  759. class __declspec(pascalimplementation) TWordField : public TIntegerField
  760. {
  761.     typedef TWordField ThisClass;
  762.     typedef TIntegerField inherited;
  763.     
  764. public:
  765.     __fastcall virtual TWordField(Classes::TComponent *AOwner);
  766. public:
  767.     /* !! TField.Destroy */ __fastcall virtual ~TWordField(void) { }
  768.     
  769. };
  770.  
  771. class __declspec(delphiclass) TAutoIncField;
  772. class __declspec(pascalimplementation) TAutoIncField : public TIntegerField
  773. {
  774.     typedef TAutoIncField ThisClass;
  775.     typedef TIntegerField inherited;
  776.     
  777. public:
  778.     __fastcall virtual TAutoIncField(Classes::TComponent *AOwner);
  779. public:
  780.     /* !! TField.Destroy */ __fastcall virtual ~TAutoIncField(void) { }
  781.     
  782. };
  783.  
  784. class __declspec(delphiclass) TFloatField;
  785. class __declspec(pascalimplementation) TFloatField : public TNumericField
  786. {
  787.     typedef TFloatField ThisClass;
  788.     typedef TNumericField inherited;
  789.     
  790. private:
  791.     System::Boolean FCurrency;
  792.     System::Boolean FCheckRange;
  793.     System::Integer FPrecision;
  794.     System::Double FMinValue;
  795.     System::Double FMaxValue;
  796.     void __fastcall SetCurrency(System::Boolean Value);
  797.     void __fastcall SetMaxValue(System::Double Value);
  798.     void __fastcall SetMinValue(System::Double Value);
  799.     void __fastcall SetPrecision(System::Integer Value);
  800.     void __fastcall UpdateCheckRange(void);
  801.     
  802. protected:
  803.     virtual System::Double __fastcall GetAsFloat(void);
  804.     virtual System::Longint __fastcall GetAsInteger(void);
  805.     virtual System::AnsiString __fastcall GetAsString(void);
  806.     virtual System::Variant __fastcall GetAsVariant(void);
  807.     virtual void __fastcall GetText( System::AnsiString &Text, System::Boolean DisplayText);
  808.     virtual void __fastcall SetAsFloat(System::Double Value);
  809.     virtual void __fastcall SetAsInteger(System::Longint Value);
  810.     virtual void __fastcall SetAsString(const System::AnsiString Value);
  811.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  812.     
  813. public:
  814.     __fastcall virtual TFloatField(Classes::TComponent *AOwner);
  815.     virtual System::Boolean __fastcall IsValidChar(System::Char Ch);
  816.     __property System::Double Value = {read=GetAsFloat, write=SetAsFloat};
  817.     
  818. __published:
  819.     __property System::Boolean currency = {read=FCurrency, write=SetCurrency, default=0};
  820.     __property System::Double MaxValue = {read=FMaxValue, write=SetMaxValue};
  821.     __property System::Double MinValue = {read=FMinValue, write=SetMinValue};
  822.     __property System::Integer Precision = {read=FPrecision, write=SetPrecision, default=15};
  823. public:
  824.     /* !! TField.Destroy */ __fastcall virtual ~TFloatField(void) { }
  825.     
  826. };
  827.  
  828. class __declspec(delphiclass) TCurrencyField;
  829. class __declspec(pascalimplementation) TCurrencyField : public TFloatField
  830. {
  831.     typedef TCurrencyField ThisClass;
  832.     typedef TFloatField inherited;
  833.     
  834. public:
  835.     __fastcall virtual TCurrencyField(Classes::TComponent *AOwner);
  836.     
  837. __published:
  838.     __property currency ;
  839. public:
  840.     /* !! TField.Destroy */ __fastcall virtual ~TCurrencyField(void) { }
  841.     
  842. };
  843.  
  844. class __declspec(delphiclass) TBCDField;
  845. class __declspec(pascalimplementation) TBCDField : public TNumericField
  846. {
  847.     typedef TBCDField ThisClass;
  848.     typedef TNumericField inherited;
  849.     
  850. public:
  851.     System::Boolean FCurrency;
  852.     System::Boolean FCheckRange;
  853.     System::Currency FMinValue;
  854.     System::Currency FMaxValue;
  855.     void __fastcall SetCurrency(System::Boolean Value);
  856.     void __fastcall SetMaxValue(System::Currency Value);
  857.     void __fastcall SetMinValue(System::Currency Value);
  858.     void __fastcall UpdateCheckRange(void);
  859.     
  860. protected:
  861.     virtual System::Currency __fastcall GetAsCurrency(void);
  862.     virtual System::Double __fastcall GetAsFloat(void);
  863.     virtual System::Longint __fastcall GetAsInteger(void);
  864.     virtual System::AnsiString __fastcall GetAsString(void);
  865.     virtual System::Variant __fastcall GetAsVariant(void);
  866.     virtual void __fastcall GetText( System::AnsiString &Text, System::Boolean DisplayText);
  867.     System::Boolean __fastcall GetValue(System::Currency &Value);
  868.     virtual void __fastcall SetAsCurrency(System::Currency Value);
  869.     virtual void __fastcall SetAsFloat(System::Double Value);
  870.     virtual void __fastcall SetAsInteger(System::Longint Value);
  871.     virtual void __fastcall SetAsString(const System::AnsiString Value);
  872.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  873.     
  874. public:
  875.     __fastcall virtual TBCDField(Classes::TComponent *AOwner);
  876.     virtual System::Boolean __fastcall IsValidChar(System::Char Ch);
  877.     __property System::Currency Value = {read=GetAsCurrency, write=SetAsCurrency};
  878.     
  879. __published:
  880.     __property System::Boolean currency = {read=FCurrency, write=SetCurrency, default=0};
  881.     __property System::Currency MaxValue = {read=FMaxValue, write=SetMaxValue};
  882.     __property System::Currency MinValue = {read=FMinValue, write=SetMinValue};
  883.     __property Size ;
  884. public:
  885.     /* !! TField.Destroy */ __fastcall virtual ~TBCDField(void) { }
  886.     
  887. };
  888.  
  889. typedef System::AnsiString DBTables_32[2];
  890.  
  891. class __declspec(delphiclass) TBooleanField;
  892. class __declspec(pascalimplementation) TBooleanField : public Db::TField
  893. {
  894.     typedef TBooleanField ThisClass;
  895.     typedef Db::TField inherited;
  896.     
  897. private:
  898.     System::AnsiString FDisplayValues;
  899.     System::AnsiString FTextValues[2];
  900.     void __fastcall LoadTextValues(void);
  901.     void __fastcall SetDisplayValues(const System::AnsiString Value);
  902.     
  903. protected:
  904.     virtual System::Boolean __fastcall GetAsBoolean(void);
  905.     virtual System::AnsiString __fastcall GetAsString(void);
  906.     virtual System::Variant __fastcall GetAsVariant(void);
  907.     virtual System::Integer __fastcall GetDefaultWidth(void);
  908.     virtual void __fastcall SetAsBoolean(System::Boolean Value);
  909.     virtual void __fastcall SetAsString(const System::AnsiString Value);
  910.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  911.     
  912. public:
  913.     __fastcall virtual TBooleanField(Classes::TComponent *AOwner);
  914.     __property System::Boolean Value = {read=GetAsBoolean, write=SetAsBoolean, nodefault};
  915.     
  916. __published:
  917.     __property System::AnsiString DisplayValues = {read=FDisplayValues, write=SetDisplayValues, nodefault
  918.         };
  919. public:
  920.     /* !! TField.Destroy */ __fastcall virtual ~TBooleanField(void) { }
  921.     
  922. };
  923.  
  924. class __declspec(delphiclass) TDateTimeField;
  925. class __declspec(pascalimplementation) TDateTimeField : public Db::TField
  926. {
  927.     typedef TDateTimeField ThisClass;
  928.     typedef Db::TField inherited;
  929.     
  930. private:
  931.     System::AnsiString FDisplayFormat;
  932.     System::Boolean __fastcall GetValue(System::TDateTime &Value);
  933.     void __fastcall SetDisplayFormat(const System::AnsiString Value);
  934.     
  935. protected:
  936.     virtual System::TDateTime __fastcall GetAsDateTime(void);
  937.     virtual System::Double __fastcall GetAsFloat(void);
  938.     virtual System::AnsiString __fastcall GetAsString(void);
  939.     virtual System::Variant __fastcall GetAsVariant(void);
  940.     virtual void __fastcall GetText( System::AnsiString &Text, System::Boolean DisplayText);
  941.     virtual void __fastcall SetAsDateTime(System::TDateTime Value);
  942.     virtual void __fastcall SetAsFloat(System::Double Value);
  943.     virtual void __fastcall SetAsString(const System::AnsiString Value);
  944.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  945.     
  946. public:
  947.     __fastcall virtual TDateTimeField(Classes::TComponent *AOwner);
  948.     __property System::TDateTime Value = {read=GetAsDateTime, write=SetAsDateTime};
  949.     
  950. __published:
  951.     __property System::AnsiString DisplayFormat = {read=FDisplayFormat, write=SetDisplayFormat, nodefault
  952.         };
  953.     __property EditMask ;
  954. public:
  955.     /* !! TField.Destroy */ __fastcall virtual ~TDateTimeField(void) { }
  956.     
  957. };
  958.  
  959. class __declspec(delphiclass) TDateField;
  960. class __declspec(pascalimplementation) TDateField : public TDateTimeField
  961. {
  962.     typedef TDateField ThisClass;
  963.     typedef TDateTimeField inherited;
  964.     
  965. public:
  966.     __fastcall virtual TDateField(Classes::TComponent *AOwner);
  967. public:
  968.     /* !! TField.Destroy */ __fastcall virtual ~TDateField(void) { }
  969.     
  970. };
  971.  
  972. class __declspec(delphiclass) TTimeField;
  973. class __declspec(pascalimplementation) TTimeField : public TDateTimeField
  974. {
  975.     typedef TTimeField ThisClass;
  976.     typedef TDateTimeField inherited;
  977.     
  978. public:
  979.     __fastcall virtual TTimeField(Classes::TComponent *AOwner);
  980. public:
  981.     /* !! TField.Destroy */ __fastcall virtual ~TTimeField(void) { }
  982.     
  983. };
  984.  
  985. class __declspec(delphiclass) TBinaryField;
  986. class __declspec(pascalimplementation) TBinaryField : public Db::TField
  987. {
  988.     typedef TBinaryField ThisClass;
  989.     typedef Db::TField inherited;
  990.     
  991. protected:
  992.     virtual System::Variant __fastcall GetAsVariant(void);
  993.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  994.     
  995. public:
  996.     __fastcall virtual TBinaryField(Classes::TComponent *AOwner);
  997.     
  998. __published:
  999.     __property Size ;
  1000. public:
  1001.     /* !! TField.Destroy */ __fastcall virtual ~TBinaryField(void) { }
  1002.     
  1003. };
  1004.  
  1005. class __declspec(delphiclass) TBytesField;
  1006. class __declspec(pascalimplementation) TBytesField : public TBinaryField
  1007. {
  1008.     typedef TBytesField ThisClass;
  1009.     typedef TBinaryField inherited;
  1010.     
  1011. public:
  1012.     __fastcall virtual TBytesField(Classes::TComponent *AOwner);
  1013. public:
  1014.     /* !! TField.Destroy */ __fastcall virtual ~TBytesField(void) { }
  1015.     
  1016. };
  1017.  
  1018. class __declspec(delphiclass) TVarBytesField;
  1019. class __declspec(pascalimplementation) TVarBytesField : public TBytesField
  1020. {
  1021.     typedef TVarBytesField ThisClass;
  1022.     typedef TBytesField inherited;
  1023.     
  1024. public:
  1025.     __fastcall virtual TVarBytesField(Classes::TComponent *AOwner);
  1026. public:
  1027.     /* !! TField.Destroy */ __fastcall virtual ~TVarBytesField(void) { }
  1028.     
  1029. };
  1030.  
  1031. typedef TFieldType TBlobType;
  1032.  
  1033. class __declspec(delphiclass) TBlobField;
  1034. class __declspec(pascalimplementation) TBlobField : public Db::TField
  1035. {
  1036.     typedef TBlobField ThisClass;
  1037.     typedef Db::TField inherited;
  1038.     
  1039. private:
  1040.     System::Boolean FModified;
  1041.     System::Boolean FTransliterate;
  1042.     TBlobType __fastcall GetBlobType(void);
  1043.     void __fastcall LoadFromBlob(TBlobField *Blob);
  1044.     void __fastcall LoadFromBitmap(Graphics::TBitmap *Bitmap);
  1045.     void __fastcall LoadFromStrings(Classes::TStrings *Strings);
  1046.     void __fastcall SaveToBitmap(Graphics::TBitmap *Bitmap);
  1047.     void __fastcall SaveToStrings(Classes::TStrings *Strings);
  1048.     void __fastcall SetBlobType(TBlobType Value);
  1049.     
  1050. protected:
  1051.     virtual void __fastcall AssignTo(Classes::TPersistent *Dest);
  1052.     virtual void __fastcall FreeBuffers(void);
  1053.     virtual System::AnsiString __fastcall GetAsString(void);
  1054.     virtual System::Variant __fastcall GetAsVariant(void);
  1055.     virtual void __fastcall GetText( System::AnsiString &Text, System::Boolean DisplayText);
  1056.     virtual void __fastcall SetAsString(const System::AnsiString Value);
  1057.     virtual void __fastcall SetVarValue(const System::Variant &Value);
  1058.     
  1059. public:
  1060.     __fastcall virtual TBlobField(Classes::TComponent *AOwner);
  1061.     virtual void __fastcall Assign(Classes::TPersistent *Source);
  1062.     virtual void __fastcall Clear(void);
  1063.     void __fastcall LoadFromFile(const System::AnsiString FileName);
  1064.     void __fastcall LoadFromStream(Classes::TStream *Stream);
  1065.     void __fastcall SaveToFile(const System::AnsiString FileName);
  1066.     void __fastcall SaveToStream(Classes::TStream *Stream);
  1067.     virtual void __fastcall SetFieldType(Db::TFieldType Value);
  1068.     virtual void __fastcall SetText(const System::AnsiString Value);
  1069.     __property System::AnsiString Value = {read=GetAsString, write=SetAsString, nodefault};
  1070.     
  1071. __published:
  1072.     __property TBlobType BlobType = {read=GetBlobType, write=SetBlobType, nodefault};
  1073.     __property Size ;
  1074. public:
  1075.     /* !! TField.Destroy */ __fastcall virtual ~TBlobField(void) { }
  1076.     
  1077. };
  1078.  
  1079. class __declspec(delphiclass) TMemoField;
  1080. class __declspec(pascalimplementation) TMemoField : public TBlobField
  1081. {
  1082.     typedef TMemoField ThisClass;
  1083.     typedef TBlobField inherited;
  1084.     
  1085. public:
  1086.     __fastcall virtual TMemoField(Classes::TComponent *AOwner);
  1087.     
  1088. __published:
  1089.     __property System::Boolean Transliterate = {read=FTransliterate, write=FTransliterate, default=1};
  1090. public:
  1091.         
  1092.     /* !! TField.Destroy */ __fastcall virtual ~TMemoField(void) { }
  1093.     
  1094. };
  1095.  
  1096. class __declspec(delphiclass) TGraphicField;
  1097. class __declspec(pascalimplementation) TGraphicField : public TBlobField
  1098. {
  1099.     typedef TGraphicField ThisClass;
  1100.     typedef TBlobField inherited;
  1101.     
  1102. public:
  1103.     __fastcall virtual TGraphicField(Classes::TComponent *AOwner);
  1104. public:
  1105.     /* !! TField.Destroy */ __fastcall virtual ~TGraphicField(void) { }
  1106.     
  1107. };
  1108.  
  1109. enum TBlobStreamMode { bmRead, bmWrite, bmReadWrite };
  1110.  
  1111. class __declspec(delphiclass) TBlobStream;
  1112. class __declspec(pascalimplementation) TBlobStream : public Classes::TStream
  1113. {
  1114.     typedef TBlobStream ThisClass;
  1115.     typedef Classes::TStream inherited;
  1116.     
  1117. private:
  1118.     TBlobField *FField;
  1119.     Db::TDataSet *FDataSet;
  1120.     System::Char *FRecord;
  1121.     System::Char *FBuffer;
  1122.     System::Integer FFieldNo;
  1123.     System::Boolean FOpened;
  1124.     System::Boolean FModified;
  1125.     System::Longint FPosition;
  1126.     System::Longint __fastcall GetBlobSize(void);
  1127.     
  1128. public:
  1129.     __fastcall TBlobStream(TBlobField *Field, TBlobStreamMode Mode);
  1130.     __fastcall virtual ~TBlobStream(void);
  1131.     virtual System::Longint __fastcall Read(void *Buffer, System::Longint Count);
  1132.     virtual System::Longint __fastcall Write(const void *Buffer, System::Longint Count);
  1133.     virtual System::Longint __fastcall Seek(System::Longint Offset, System::Word Origin);
  1134.     void __fastcall Truncate(void);
  1135. };
  1136.  
  1137. class __declspec(delphiclass) TFieldDataLink;
  1138. class __declspec(pascalimplementation) TFieldDataLink : public Db::TDataLink
  1139. {
  1140.     typedef TFieldDataLink ThisClass;
  1141.     typedef Db::TDataLink inherited;
  1142.     
  1143. private:
  1144.     Db::TField *FField;
  1145.     System::AnsiString FFieldName;
  1146.     Controls::TWinControl *FControl;
  1147.     System::Boolean FEditing;
  1148.     System::Boolean FModified;
  1149.     Classes::TNotifyEvent FOnDataChange;
  1150.     Classes::TNotifyEvent FOnEditingChange;
  1151.     Classes::TNotifyEvent FOnUpdateData;
  1152.     Classes::TNotifyEvent FOnActiveChange;
  1153.     System::Boolean __fastcall GetCanModify(void);
  1154.     void __fastcall SetEditing(System::Boolean Value);
  1155.     void __fastcall SetField(Db::TField *Value);
  1156.     void __fastcall SetFieldName(const System::AnsiString Value);
  1157.     void __fastcall UpdateField(void);
  1158.     
  1159. protected:
  1160.     virtual void __fastcall ActiveChanged(void);
  1161.     virtual void __fastcall EditingChanged(void);
  1162.     virtual void __fastcall FocusControl(Db::TFieldRef Field);
  1163.     virtual void __fastcall LayoutChanged(void);
  1164.     virtual void __fastcall RecordChanged(Db::TField *Field);
  1165.     virtual void __fastcall UpdateData(void);
  1166.     
  1167. public:
  1168.     System::Boolean __fastcall Edit(void);
  1169.     void __fastcall Modified(void);
  1170.     void __fastcall Reset(void);
  1171.     __property System::Boolean CanModify = {read=GetCanModify, nodefault};
  1172.     __property Controls::TWinControl * Control = {read=FControl, write=FControl, nodefault};
  1173.     __property System::Boolean Editing = {read=FEditing, nodefault};
  1174.     __property Db::TField * Field = {read=FField, nodefault};
  1175.     __property System::AnsiString FieldName = {read=FFieldName, write=SetFieldName, nodefault};
  1176.     __property Classes::TNotifyEvent OnDataChange = {read=FOnDataChange, write=FOnDataChange};
  1177.     __property Classes::TNotifyEvent OnEditingChange = {read=FOnEditingChange, write=FOnEditingChange};
  1178.         
  1179.     __property Classes::TNotifyEvent OnUpdateData = {read=FOnUpdateData, write=FOnUpdateData};
  1180.     __property Classes::TNotifyEvent OnActiveChange = {read=FOnActiveChange, write=FOnActiveChange};
  1181. public:
  1182.         
  1183.     /* !! TDataLink.Create */ __fastcall TFieldDataLink(void) : Db::TDataLink() { }
  1184.     /* !! TDataLink.Destroy */ __fastcall virtual ~TFieldDataLink(void) { }
  1185.     
  1186. };
  1187.  
  1188. //-- var, const, procedure ---------------------------------------------------
  1189. extern System::Boolean __fastcall BCDToCurr(const Bde::FMTBcd &BCD, System::Currency &Curr);
  1190. extern System::Boolean __fastcall CurrToBCD(System::Currency Curr, Bde::FMTBcd &BCD, System::Integer 
  1191.     Precision, System::Integer Decimals);
  1192. //-- template instantiations -------------------------------------------------
  1193. template class SmallString<64> ;
  1194. template class TIndexOptions ;
  1195.  
  1196. }    /* namespace Dbtables */
  1197. #if !defined(NO_IMPLICIT_NAMESPACE_USE)
  1198. using namespace Dbtables;
  1199. #endif
  1200. //-- end unit ----------------------------------------------------------------
  1201. #endif    // DBTables
  1202.