home *** CD-ROM | disk | FTP | other *** search
- //----------------------------------------------------------------------------
- // DB.hpp - dcc32 generated hdr (DO NOT EDIT) rev: -2
- // From: DB.pas
- //----------------------------------------------------------------------------
- #ifndef DBHPP
- #define DBHPP
- //----------------------------------------------------------------------------
- #ifndef ClassesHPP
- #include <Classes.hpp>
- #endif
-
- #ifndef BdeHPP
- #include <Bde.hpp>
- #endif
-
- #ifndef WindowsHPP
- #include <Windows.hpp>
- #endif
-
- #ifndef SysUtilsHPP
- #include <SysUtils.hpp>
- #endif
-
- #ifndef SystemHPP
- #include <System.hpp>
- #endif
-
- namespace Db
- {
- //-- type declarations -------------------------------------------------------
- typedef Bde::FLDDesc TFieldDescList[1024];
-
- typedef TFieldDescList *PFieldDescList;
-
- typedef Bde::IDXDesc TIndexDescList[64];
-
- typedef TIndexDescList *PIndexDescList;
-
- class __declspec(delphiclass) EDatabaseError;
- class __declspec(pascalimplementation) EDatabaseError : public Sysutils::Exception
- {
- typedef EDatabaseError ThisClass;
- typedef Sysutils::Exception inherited;
-
- public:
- /* !! Exception.Create */ __fastcall EDatabaseError(const System::AnsiString Msg) : Sysutils::Exception(
- Msg) { }
- /* !! Exception.CreateFmt */ __fastcall EDatabaseError(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall EDatabaseError(System::Integer Ident) : Sysutils::Exception(
- Ident) { }
- /* !! Exception.CreateResFmt */ __fastcall EDatabaseError(System::Integer Ident, const TVarRec *Args
- , const System::Integer Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall EDatabaseError(const System::AnsiString Msg, System::Integer
- AHelpContext) : Sysutils::Exception(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall EDatabaseError(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Msg, Args
- , Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall EDatabaseError(System::Integer Ident, System::Integer AHelpContext
- ) : Sysutils::Exception(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall EDatabaseError(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Sysutils::Exception(Ident,
- Args, Args_Size, AHelpContext) { }
-
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~EDatabaseError(void) { }
-
- };
-
- class __declspec(delphiclass) EDBEngineError;
- class __declspec(delphiclass) TDBError;
- class __declspec(pascalimplementation) EDBEngineError : public EDatabaseError
- {
- typedef EDBEngineError ThisClass;
- typedef EDatabaseError inherited;
-
- private:
- Classes::TList *FErrors;
- TDBError *__fastcall GetError(System::Integer Index);
- System::Integer __fastcall GetErrorCount(void);
-
- public:
- __fastcall EDBEngineError(System::Word ErrorCode);
- __fastcall virtual ~EDBEngineError(void);
- __property System::Integer ErrorCount = {read=GetErrorCount, nodefault};
- __property TDBError * Errors[System::Integer Index] = {read=GetError};
- public:
- /* !! Exception.CreateFmt */ __fastcall EDBEngineError(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size) : Db::EDatabaseError(Msg, Args, Args_Size) { }
- /* !! Exception.CreateRes */ __fastcall EDBEngineError(System::Integer Ident) : Db::EDatabaseError(
- Ident) { }
- /* !! Exception.CreateResFmt */ __fastcall EDBEngineError(System::Integer Ident, const TVarRec *Args
- , const System::Integer Args_Size) : Db::EDatabaseError(Ident, Args, Args_Size) { }
- /* !! Exception.CreateHelp */ __fastcall EDBEngineError(const System::AnsiString Msg, System::Integer
- AHelpContext) : Db::EDatabaseError(Msg, AHelpContext) { }
- /* !! Exception.CreateFmtHelp */ __fastcall EDBEngineError(const System::AnsiString Msg, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Db::EDatabaseError(Msg, Args
- , Args_Size, AHelpContext) { }
- /* !! Exception.CreateResHelp */ __fastcall EDBEngineError(System::Integer Ident, System::Integer AHelpContext
- ) : Db::EDatabaseError(Ident, AHelpContext) { }
- /* !! Exception.CreateResFmtHelp */ __fastcall EDBEngineError(System::Integer Ident, const TVarRec
- *Args, const System::Integer Args_Size, System::Integer AHelpContext) : Db::EDatabaseError(Ident,
- Args, Args_Size, AHelpContext) { }
-
- };
-
- class __declspec(pascalimplementation) TDBError : public System::TObject
- {
- typedef TDBError ThisClass;
- typedef System::TObject inherited;
-
- private:
- System::Word FErrorCode;
- System::Longint FNativeError;
- System::AnsiString FMessage;
- System::Byte __fastcall GetCategory(void);
- System::Byte __fastcall GetSubCode(void);
-
- public:
- __fastcall TDBError(EDBEngineError *Owner, System::Word ErrorCode, System::Longint NativeError, System::PChar
- Message);
- __property System::Byte Category = {read=GetCategory, nodefault};
- __property System::Word ErrorCode = {read=FErrorCode, nodefault};
- __property System::Byte SubCode = {read=GetSubCode, nodefault};
- __property System::AnsiString Message = {read=FMessage, nodefault};
- __property System::Longint NativeError = {read=FNativeError, nodefault};
- public:
- /* !! TObject.Destroy */ __fastcall virtual ~TDBError(void) { }
-
- };
-
- typedef void *TLocale;
-
- typedef Bde::CBRType __fastcall (__closure *TBDECallbackEvent)(System::Pointer CBInfo);
-
- class __declspec(delphiclass) TBDECallback;
- class __declspec(pascalimplementation) TBDECallback : public System::TObject
- {
- typedef TBDECallback ThisClass;
- typedef System::TObject inherited;
-
- private:
- Bde::_hDBIObj *FHandle;
- System::TObject *FOwner;
- CBType FCBType;
- System::Longint FOldCBData;
- void *FOldCBBuf;
- System::Word FOldCBBufLen;
- Bde::pfDBICallBack FOldCBFunc;
- System::Boolean FInstalled;
- TBDECallbackEvent FCallbackEvent;
-
- protected:
- Bde::CBRType __fastcall Invoke(Bde::CBType CallType, System::Pointer CBInfo);
-
- public:
- __fastcall TBDECallback(System::TObject *AOwner, Bde::hDBICur Handle, Bde::CBType CBType, System::Pointer
- CBBuf, System::Integer CBBufSize, TBDECallbackEvent CallbackEvent, System::Boolean Chain);
- __fastcall virtual ~TBDECallback(void);
- };
-
- class __declspec(delphiclass) TSessionList;
- class __declspec(delphiclass) TSession;
- class __declspec(pascalimplementation) TSessionList : public System::TObject
- {
- typedef TSessionList ThisClass;
- typedef System::TObject inherited;
-
- private:
- Classes::TList *FSessions;
- void __fastcall AddSession(TSession *ASession);
- void __fastcall CloseAll(void);
- System::Integer __fastcall GetCount(void);
- TSession *__fastcall GetSession(System::Integer Index);
- TSession *__fastcall GetCurrentSession(void);
- TSession *__fastcall GetSessionByName(const System::AnsiString SessionName);
- void __fastcall SetCurrentSession(TSession *Value);
-
- public:
- __fastcall TSessionList(void);
- __fastcall virtual ~TSessionList(void);
- __property TSession * CurrentSession = {read=GetCurrentSession, write=SetCurrentSession, nodefault}
- ;
- TSession *__fastcall FindSession(const System::AnsiString SessionName);
- void __fastcall GetSessionNames(Classes::TStrings *List);
- TSession *__fastcall OpenSession(const System::AnsiString SessionName);
- __property System::Integer Count = {read=GetCount, nodefault};
- __property TSession * Sessions[System::Integer Index] = {read=GetSession/*, default*/};
- __property TSession * List[System::AnsiString SessionName] = {read=GetSessionByName};
- };
-
- enum TConfigMode { cmPersistent, cmSession, cmAll };
-
- typedef void __fastcall (__closure *TPasswordEvent)(System::TObject *Sender, System::Boolean &Continue
- );
-
- enum TDatabaseEvent { dbOpen, dbClose, dbAdd, dbRemove, dbAddAlias, dbDeleteAlias };
-
- typedef void __fastcall (__closure *TDatabaseNotifyEvent)(TDatabaseEvent DBEvent, const void *Param)
- ;
-
- typedef void __fastcall (*TBDEInitProc)(TSession *Session);
-
- enum TTraceFlag { tfQPrepare, tfQExecute, tfError, tfStmt, tfConnect, tfTransact, tfBlob, tfMisc, tfVendor
- };
-
- typedef Set<TTraceFlag, tfQPrepare, tfVendor> TTraceFlags;
-
- typedef System::LongBool __stdcall (*TWriteProc)(System::TObject *Client, System::PChar Data, System::Integer
- Len);
-
- typedef System::TObject *__stdcall (*TSMRegProc)(System::Integer Handle, System::PChar ClientName, TWriteProc
- &WriteProc, System::TObject *Instance, const System::Pointer SignalProc);
-
- class __declspec(delphiclass) TDatabase;
- class __declspec(pascalimplementation) TSession : public Classes::TComponent
- {
- typedef TSession ThisClass;
- typedef Classes::TComponent inherited;
-
- private:
- Bde::_hDBIObj *FHandle;
- System::Boolean FDefault;
- Classes::TList *FDatabases;
- Classes::TList *FCallbacks;
- void *FLocale;
- System::Integer FClientLib;
- TSMRegProc FSMRegProc;
- TWriteProc FSMWriteProc;
- Bde::TRACEDesc *FSMBuffer;
- System::TObject *FSMClient;
- TTraceFlags FTraceFlags;
- System::Boolean FStreamedActive;
- System::Boolean FKeepConnections;
- System::AnsiString FSessionName;
- System::AnsiString FNetFileDir;
- System::AnsiString FPrivateDir;
- CBSCType FCBSCType;
- System::Boolean FDLLDetach;
- System::Boolean FBDEOwnsLoginCbDb;
- System::Integer FLockCount;
- Bde::TCBDBLogin FCBDBLogin;
- TPasswordEvent FOnPassword;
- Classes::TNotifyEvent FOnStartup;
- TDatabaseNotifyEvent FOnDBNotify;
- void __fastcall AddDatabase(TDatabase *Value);
- void __fastcall AddConfigRecord(const System::AnsiString Path, const System::AnsiString Node, Classes::TStrings *
- List);
- void __fastcall CallBDEInitProcs(void);
- void __fastcall CheckInactive(void);
- void __fastcall CheckConfigMode(TConfigMode CfgMode);
- Bde::CBRType __fastcall DBLoginCallback(System::Pointer CBInfo);
- void __fastcall DBNotification(TDatabaseEvent DBEvent, const void *Param);
- void __fastcall DeleteConfigPath(const System::AnsiString Path, const System::AnsiString Node);
- System::Boolean __fastcall GetActive(void);
- TConfigMode __fastcall GetConfigMode(void);
- TDatabase *__fastcall GetDatabase(System::Integer Index);
- System::Integer __fastcall GetDatabaseCount(void);
- Bde::hDBISes __fastcall GetHandle(void);
- System::AnsiString __fastcall GetNetFileDir(void);
- System::AnsiString __fastcall GetPrivateDir(void);
- void __fastcall InitializeBDE(void);
- void __fastcall InternalAddAlias(const System::AnsiString Name, const System::AnsiString Driver, Classes::TStrings *
- List, TConfigMode CfgMode, System::Boolean RestoreMode);
- void __fastcall InternalDeleteAlias(const System::AnsiString Name, TConfigMode CfgMode, System::Boolean
- RestoreMode);
- void __fastcall LockSession(void);
- void __fastcall MakeCurrent(void);
- void __fastcall ModifyConfigParams(const System::AnsiString Path, const System::AnsiString Node, Classes::TStrings *
- List);
- void __fastcall RegisterCallbacks(System::Boolean Value);
- void __fastcall RemoveDatabase(TDatabase *Value);
- Bde::CBRType __fastcall ServerCallback(System::Pointer CBInfo);
- void __fastcall SetActive(System::Boolean Value);
- void __fastcall SetConfigMode(TConfigMode Value);
- void __fastcall SetConfigParams(const System::AnsiString Path, const System::AnsiString Node, Classes::TStrings *
- List);
- void __fastcall SetNetFileDir(const System::AnsiString Value);
- void __fastcall SetPrivateDir(const System::AnsiString Value);
- void __fastcall SetSessionName(const System::AnsiString Value);
- void __fastcall SetTraceFlags( TTraceFlags Value);
- void __fastcall SMClientSignal(System::TObject *Sender, System::Integer Data);
- Bde::CBRType __fastcall SqlTraceCallback(System::Pointer CBInfo);
- void __fastcall StartSession(System::Boolean Value);
- void __fastcall UnlockSession(void);
-
- protected:
- virtual void __fastcall Loaded(void);
- __property TDatabaseNotifyEvent OnDBNotify = {read=FOnDBNotify, write=FOnDBNotify};
- __property System::Boolean BDEOwnsLoginCbDb = {read=FBDEOwnsLoginCbDb, write=FBDEOwnsLoginCbDb, nodefault
- };
-
- public:
- __fastcall virtual TSession(Classes::TComponent *AOwner);
- __fastcall virtual ~TSession(void);
- void __fastcall AddAlias(const System::AnsiString Name, const System::AnsiString Driver, Classes::TStrings *
- List);
- void __fastcall AddStandardAlias(const System::AnsiString Name, const System::AnsiString Path, const System::AnsiString
- DefaultDriver);
- __property TConfigMode ConfigMode = {read=GetConfigMode, write=SetConfigMode, nodefault};
- void __fastcall AddPassword(const System::AnsiString Password);
- void __fastcall Close(void);
- void __fastcall CloseDatabase(TDatabase *Database);
- void __fastcall DeleteAlias(const System::AnsiString Name);
- void __fastcall DropConnections(void);
- TDatabase *__fastcall FindDatabase(const System::AnsiString DatabaseName);
- void __fastcall GetAliasNames(Classes::TStrings *List);
- void __fastcall GetAliasParams(const System::AnsiString AliasName, Classes::TStrings *List);
- System::AnsiString __fastcall GetAliasDriverName(const System::AnsiString AliasName);
- void __fastcall GetConfigParams(const System::AnsiString Path, const System::AnsiString Section, Classes::TStrings *
- List);
- void __fastcall GetDatabaseNames(Classes::TStrings *List);
- void __fastcall GetDriverNames(Classes::TStrings *List);
- void __fastcall GetDriverParams(const System::AnsiString DriverName, Classes::TStrings *List);
- System::Boolean __fastcall GetPassword(void);
- void __fastcall GetTableNames(const System::AnsiString DatabaseName, const System::AnsiString Pattern
- , System::Boolean Extensions, System::Boolean SystemTables, Classes::TStrings *List);
- void __fastcall GetStoredProcNames(const System::AnsiString DatabaseName, Classes::TStrings *List);
-
- System::Boolean __fastcall IsAlias(const System::AnsiString Name);
- void __fastcall ModifyAlias( System::AnsiString Name, Classes::TStrings *List);
- void __fastcall Open(void);
- TDatabase *__fastcall OpenDatabase(const System::AnsiString DatabaseName);
- void __fastcall RemoveAllPasswords(void);
- void __fastcall RemovePassword(const System::AnsiString Password);
- void __fastcall SaveConfigFile(void);
- __property System::Integer DatabaseCount = {read=GetDatabaseCount, nodefault};
- __property TDatabase * Databases[System::Integer Index] = {read=GetDatabase};
- __property Bde::hDBISes Handle = {read=GetHandle, nodefault};
- __property System::Pointer Locale = {read=FLocale, nodefault};
- __property TTraceFlags TraceFlags = {read=FTraceFlags, write=SetTraceFlags, nodefault};
-
- __published:
- __property System::Boolean Active = {read=GetActive, write=SetActive, default=0};
- __property System::Boolean KeepConnections = {read=FKeepConnections, write=FKeepConnections, default=1
- };
- __property System::AnsiString NetFileDir = {read=GetNetFileDir, write=SetNetFileDir, nodefault};
- __property System::AnsiString PrivateDir = {read=GetPrivateDir, write=SetPrivateDir, nodefault};
- __property System::AnsiString SessionName = {read=FSessionName, write=SetSessionName, nodefault};
- __property TPasswordEvent OnPassword = {read=FOnPassword, write=FOnPassword};
- __property Classes::TNotifyEvent OnStartup = {read=FOnStartup, write=FOnStartup};
- };
-
- class __declspec(delphiclass) TParamList;
- class __declspec(pascalimplementation) TParamList : public System::TObject
- {
- typedef TParamList ThisClass;
- typedef System::TObject inherited;
-
- private:
- System::Integer FFieldCount;
- System::Word FBufSize;
- TFieldDescList *FFieldDescs;
- System::Char *FBuffer;
-
- public:
- __fastcall TParamList(Classes::TStrings *Params);
- __fastcall virtual ~TParamList(void);
- __property System::PChar Buffer = {read=FBuffer, nodefault};
- __property System::Integer FieldCount = {read=FFieldCount, nodefault};
- __property PFieldDescList FieldDescs = {read=FFieldDescs, nodefault};
- };
-
- enum TTransIsolation { tiDirtyRead, tiReadCommitted, tiRepeatableRead };
-
- typedef void __fastcall (__closure *TLoginEvent)(TDatabase *Database, Classes::TStrings *LoginParams
- );
-
- class __declspec(delphiclass) TDBDataSet;
- class __declspec(pascalimplementation) TDatabase : public Classes::TComponent
- {
- typedef TDatabase ThisClass;
- typedef Classes::TComponent inherited;
-
- private:
- Classes::TList *FDataSets;
- TTransIsolation FTransIsolation;
- System::Boolean FLoginPrompt;
- System::Boolean FKeepConnection;
- System::Boolean FTemporary;
- System::Boolean FSessionAlias;
- System::Boolean FStreamedConnected;
- System::Boolean FLocaleLoaded;
- System::Boolean FAliased;
- System::Byte FReserved;
- System::Integer FRefCount;
- Bde::_hDBIObj *FHandle;
- System::Boolean FSQLBased;
- Bde::_hDBIObj *FTransHandle;
- void *FLocale;
- TSession *FSession;
- System::AnsiString FSessionName;
- Classes::TStrings *FParams;
- System::AnsiString FDatabaseName;
- System::AnsiString FDatabaseType;
- System::Boolean FAcquiredHandle;
- TLoginEvent FOnLogin;
- void __fastcall CheckActive(void);
- void __fastcall CheckInactive(void);
- void __fastcall CheckDatabaseName(void);
- void __fastcall CheckDatabaseAlias( System::AnsiString &Password);
- void __fastcall CheckSessionName(System::Boolean Required);
- void __fastcall EndTransaction(Bde::eXEnd TransEnd);
- System::AnsiString __fastcall GetAliasName(void);
- System::Boolean __fastcall GetConnected(void);
- TDBDataSet *__fastcall GetDataSet(System::Integer Index);
- System::Integer __fastcall GetDataSetCount(void);
- System::AnsiString __fastcall GetDirectory(void);
- System::AnsiString __fastcall GetDriverName(void);
- System::Boolean __fastcall GetIsSQLBased(void);
- System::Boolean __fastcall GetInTransaction(void);
- TTraceFlags __fastcall GetTraceFlags(void);
- void __fastcall LoadLocale(void);
- void __fastcall Login(Classes::TStrings *LoginParams);
- void __fastcall ParamsChanging(System::TObject *Sender);
- void __fastcall SetAliasName(const System::AnsiString Value);
- void __fastcall SetConnected(System::Boolean Value);
- void __fastcall SetDatabaseName(const System::AnsiString Value);
- void __fastcall SetDatabaseType(const System::AnsiString Value, System::Boolean Aliased);
- void __fastcall SetDirectory(const System::AnsiString Value);
- void __fastcall SetDriverName(const System::AnsiString Value);
- void __fastcall SetHandle(Bde::hDBIDb Value);
- void __fastcall SetKeepConnection(System::Boolean Value);
- void __fastcall SetParams(Classes::TStrings *Value);
- void __fastcall SetTraceFlags( TTraceFlags Value);
- void __fastcall SetSessionName(const System::AnsiString Value);
-
- protected:
- virtual void __fastcall Loaded(void);
-
- public:
- __fastcall virtual TDatabase(Classes::TComponent *AOwner);
- __fastcall virtual ~TDatabase(void);
- void __fastcall ApplyUpdates(const TDBDataSet *DataSets, const System::Integer DataSets_Size);
- void __fastcall Close(void);
- void __fastcall CloseDataSets(void);
- void __fastcall Commit(void);
- void __fastcall FlushSchemaCache(const System::AnsiString TableName);
- void __fastcall Open(void);
- void __fastcall Rollback(void);
- void __fastcall StartTransaction(void);
- void __fastcall ValidateName(const System::AnsiString Name);
- __property System::Integer DataSetCount = {read=GetDataSetCount, nodefault};
- __property TDBDataSet * DataSets[System::Integer Index] = {read=GetDataSet};
- __property System::AnsiString Directory = {read=GetDirectory, write=SetDirectory, nodefault};
- __property Bde::hDBIDb Handle = {read=FHandle, write=SetHandle, nodefault};
- __property System::Boolean IsSQLBased = {read=FSQLBased, nodefault};
- __property System::Boolean InTransaction = {read=GetInTransaction, nodefault};
- __property System::Pointer Locale = {read=FLocale, nodefault};
- __property TSession * Session = {read=FSession, nodefault};
- __property System::Boolean Temporary = {read=FTemporary, write=FTemporary, nodefault};
- __property System::Boolean SessionAlias = {read=FSessionAlias, nodefault};
- __property TTraceFlags TraceFlags = {read=GetTraceFlags, write=SetTraceFlags, nodefault};
-
- __published:
- __property System::AnsiString AliasName = {read=GetAliasName, write=SetAliasName, nodefault};
- __property System::Boolean Connected = {read=GetConnected, write=SetConnected, default=0};
- __property System::AnsiString DatabaseName = {read=FDatabaseName, write=SetDatabaseName, nodefault}
- ;
- __property System::AnsiString DriverName = {read=GetDriverName, write=SetDriverName, nodefault};
- __property System::Boolean KeepConnection = {read=FKeepConnection, write=SetKeepConnection, default=1
- };
- __property System::Boolean LoginPrompt = {read=FLoginPrompt, write=FLoginPrompt, default=1};
- __property Classes::TStrings * Params = {read=FParams, write=SetParams, nodefault};
- __property System::AnsiString SessionName = {read=FSessionName, write=SetSessionName, nodefault};
- __property TTransIsolation TransIsolation = {read=FTransIsolation, write=FTransIsolation, default=1
- };
- __property TLoginEvent OnLogin = {read=FOnLogin, write=FOnLogin};
- };
-
- enum TDataEvent { deFieldChange, deRecordChange, deDataSetChange, deDataSetScroll, deLayoutChange, deUpdateRecord,
- deUpdateState, deCheckBrowseMode, dePropertyChange, deFieldListChange, deFocusControl };
-
- class __declspec(delphiclass) TDataSetDesigner;
- class __declspec(delphiclass) TDataSet;
- class __declspec(delphiclass) TFieldDefs;
- class __declspec(delphiclass) TFieldDef;
- enum TFieldType { ftUnknown, ftString, ftSmallint, ftInteger, ftWord, ftBoolean, ftFloat, ftCurrency,
- ftBCD, ftDate, ftTime, ftDateTime, ftBytes, ftVarBytes, ftAutoInc, ftBlob, ftMemo, ftGraphic, ftFmtMemo,
- ftParadoxOle, ftDBaseOle, ftTypedBinary };
-
- class __declspec(pascalimplementation) TFieldDefs : public System::TObject
- {
- typedef TFieldDefs ThisClass;
- typedef System::TObject inherited;
-
- private:
- TDataSet *FDataSet;
- Classes::TList *FItems;
- System::Boolean FUpdated;
- System::Byte FReserved;
- System::Integer __fastcall GetCount(void);
- TFieldDef *__fastcall GetItem(System::Integer Index);
-
- public:
- __fastcall TFieldDefs(TDataSet *DataSet);
- __fastcall virtual ~TFieldDefs(void);
- void __fastcall Add(const System::AnsiString Name, TFieldType DataType, System::Word Size, System::Boolean
- Required);
- void __fastcall AddFieldDesc(const Bde::FLDDesc &FieldDesc, System::Boolean Required, System::Word
- FieldNo);
- void __fastcall Assign(TFieldDefs *FieldDefs);
- void __fastcall Clear(void);
- TFieldDef *__fastcall Find(const System::AnsiString Name);
- System::Integer __fastcall IndexOf(const System::AnsiString Name);
- void __fastcall Update(void);
- __property System::Integer Count = {read=GetCount, nodefault};
- __property TFieldDef * Items[System::Integer Index] = {read=GetItem/*, default*/};
- };
-
- typedef System::Char *TBufferList[1024];
-
- typedef TBufferList *PBufferList;
-
- enum TDataSetState { dsInactive, dsBrowse, dsEdit, dsInsert, dsSetKey, dsCalcFields, dsUpdateNew, dsUpdateOld,
- dsFilter };
-
- enum TRecNoStatus { rnDbase, rnParadox, rnNotSupported };
-
- class __declspec(delphiclass) TDataLink;
- class __declspec(delphiclass) TDataSource;
- class __declspec(delphiclass) TField;
- typedef void __fastcall (__closure *TDataChangeEvent)(System::TObject *Sender, TField *Field);
-
- class __declspec(pascalimplementation) TDataSource : public Classes::TComponent
- {
- typedef TDataSource ThisClass;
- typedef Classes::TComponent inherited;
-
- private:
- TDataSet *FDataSet;
- Classes::TList *FDataLinks;
- System::Boolean FEnabled;
- System::Boolean FAutoEdit;
- TDataSetState FState;
- System::Byte FReserved;
- Classes::TNotifyEvent FOnStateChange;
- TDataChangeEvent FOnDataChange;
- Classes::TNotifyEvent FOnUpdateData;
- void __fastcall AddDataLink(TDataLink *DataLink);
- void __fastcall DataEvent(TDataEvent Event, System::Longint Info);
- void __fastcall NotifyDataLinks(TDataEvent Event, System::Longint Info);
- void __fastcall RemoveDataLink(TDataLink *DataLink);
- void __fastcall SetDataSet(TDataSet *ADataSet);
- void __fastcall SetEnabled(System::Boolean Value);
- void __fastcall SetState(TDataSetState Value);
- void __fastcall UpdateState(void);
-
- public:
- __fastcall virtual TDataSource(Classes::TComponent *AOwner);
- __fastcall virtual ~TDataSource(void);
- void __fastcall Edit(void);
- System::Boolean __fastcall IsLinkedTo(TDataSet *DataSet);
- __property TDataSetState State = {read=FState, nodefault};
-
- __published:
- __property System::Boolean AutoEdit = {read=FAutoEdit, write=FAutoEdit, default=1};
- __property TDataSet * DataSet = {read=FDataSet, write=SetDataSet, nodefault};
- __property System::Boolean Enabled = {read=FEnabled, write=SetEnabled, default=1};
- __property Classes::TNotifyEvent OnStateChange = {read=FOnStateChange, write=FOnStateChange};
- __property TDataChangeEvent OnDataChange = {read=FOnDataChange, write=FOnDataChange};
- __property Classes::TNotifyEvent OnUpdateData = {read=FOnUpdateData, write=FOnUpdateData};
- };
-
- typedef TField **TFieldRef;
-
- class __declspec(pascalimplementation) TDataLink : public Classes::TPersistent
- {
- typedef TDataLink ThisClass;
- typedef Classes::TPersistent inherited;
-
- private:
- TDataSource *FDataSource;
- TDataLink *FNext;
- System::Integer FBufferCount;
- System::Integer FFirstRecord;
- System::Boolean FReadOnly;
- System::Boolean FActive;
- System::Boolean FEditing;
- System::Boolean FUpdating;
- System::Boolean FDataSourceFixed;
- void __fastcall DataEvent(TDataEvent Event, System::Longint Info);
- System::Integer __fastcall GetActiveRecord(void);
- TDataSet *__fastcall GetDataSet(void);
- System::Integer __fastcall GetRecordCount(void);
- void __fastcall SetActive(System::Boolean Value);
- void __fastcall SetActiveRecord(System::Integer Value);
- void __fastcall SetBufferCount(System::Integer Value);
- void __fastcall SetDataSource(TDataSource *ADataSource);
- void __fastcall SetEditing(System::Boolean Value);
- void __fastcall SetReadOnly(System::Boolean Value);
- void __fastcall UpdateRange(void);
- void __fastcall UpdateState(void);
-
- protected:
- virtual void __fastcall ActiveChanged(void);
- virtual void __fastcall CheckBrowseMode(void);
- virtual void __fastcall DataSetChanged(void);
- virtual void __fastcall DataSetScrolled(System::Integer Distance);
- virtual void __fastcall FocusControl(TFieldRef Field);
- virtual void __fastcall EditingChanged(void);
- virtual void __fastcall LayoutChanged(void);
- virtual void __fastcall RecordChanged(TField *Field);
- virtual void __fastcall UpdateData(void);
-
- public:
- __fastcall TDataLink(void);
- __fastcall virtual ~TDataLink(void);
- System::Boolean __fastcall Edit(void);
- void __fastcall UpdateRecord(void);
- __property System::Boolean Active = {read=FActive, nodefault};
- __property System::Integer ActiveRecord = {read=GetActiveRecord, write=SetActiveRecord, nodefault};
-
- __property System::Integer BufferCount = {read=FBufferCount, write=SetBufferCount, nodefault};
- __property TDataSet * DataSet = {read=GetDataSet, nodefault};
- __property TDataSource * DataSource = {read=FDataSource, write=SetDataSource, nodefault};
- __property System::Boolean DataSourceFixed = {read=FDataSourceFixed, write=FDataSourceFixed, nodefault
- };
- __property System::Boolean Editing = {read=FEditing, nodefault};
- __property System::Boolean ReadOnly = {read=FReadOnly, write=SetReadOnly, nodefault};
- __property System::Integer RecordCount = {read=GetRecordCount, nodefault};
- };
-
- struct TKeyBuffer;
- typedef TKeyBuffer *PKeyBuffer;
-
- enum TFilterOption { foCaseInsensitive, foNoPartialCompare };
-
- typedef Set<TFilterOption, foCaseInsensitive, foNoPartialCompare> TFilterOptions;
-
- typedef void __fastcall (__closure *TOnServerYieldEvent)(TDataSet *DataSet, System::Boolean &AbortQuery
- );
-
- class __declspec(delphiclass) TDataSetUpdateObject;
- enum TUpdateKind { ukModify, ukInsert, ukDelete };
-
- class __declspec(pascalimplementation) TDataSetUpdateObject : public Classes::TComponent
- {
- typedef TDataSetUpdateObject ThisClass;
- typedef Classes::TComponent inherited;
-
- protected:
- virtual TDataSet *__fastcall GetDataSet(void) = 0;
- virtual void __fastcall SetDataSet(TDataSet *ADataSet) = 0;
- virtual void __fastcall Apply(TUpdateKind UpdateKind) = 0;
- __property TDataSet * DataSet = {read=GetDataSet, write=SetDataSet, nodefault};
- public:
- /* !! TComponent.Create */ __fastcall virtual TDataSetUpdateObject(Classes::TComponent *AOwner) : Classes::TComponent(
- AOwner) { }
- /* !! TComponent.Destroy */ __fastcall virtual ~TDataSetUpdateObject(void) { }
-
- };
-
- typedef void __fastcall (__closure *TDataSetNotifyEvent)(TDataSet *DataSet);
-
- enum TUpdateAction { uaFail, uaAbort, uaSkip, uaRetry, uaApplied };
-
- typedef void __fastcall (__closure *TUpdateErrorEvent)(TDataSet *DataSet, EDatabaseError *E, TUpdateKind
- UpdateKind, TUpdateAction &UpdateAction);
-
- typedef void __fastcall (__closure *TUpdateRecordEvent)(TDataSet *DataSet, TUpdateKind UpdateKind, TUpdateAction
- &UpdateAction);
-
- typedef void __fastcall (__closure *TFilterRecordEvent)(TDataSet *DataSet, System::Boolean &Accept);
-
-
- enum TDataAction { daFail, daAbort, daRetry };
-
- typedef void __fastcall (__closure *TDataSetErrorEvent)(TDataSet *DataSet, EDatabaseError *E, TDataAction
- &Action);
-
- typedef System::Word __fastcall (__closure *TDataOperation)(void);
-
- enum TLocateOption { loCaseInsensitive, loPartialKey };
-
- typedef Set<TLocateOption, loCaseInsensitive, loPartialKey> TLocateOptions;
-
- enum TGetMode { gmCurrent, gmNext, gmPrior };
-
- enum TKeyIndex { kiLookup, kiRangeStart, kiRangeEnd, kiCurRangeStart, kiCurRangeEnd, kiSave };
-
- enum DB_41 { rtModified, rtInserted, rtDeleted, rtUnmodified };
-
- typedef Set<DB_41, rtModified, rtUnmodified> TUpdateRecordTypes;
-
- enum DB_21 { rmExact, rmCenter };
-
- typedef Set<DB_21, rmExact, rmCenter> TResyncMode;
-
- enum TUpdateStatus { usUnmodified, usModified, usInserted, usDeleted };
-
- class __declspec(pascalimplementation) TDataSet : public Classes::TComponent
- {
- typedef TDataSet ThisClass;
- typedef Classes::TComponent inherited;
-
- private:
- Classes::TList *FFields;
- Classes::TList *FDataSources;
- TFieldDefs *FFieldDefs;
- TBufferList *FBuffers;
- System::Integer FBufListSize;
- System::Integer FBufferCount;
- System::Integer FRecordCount;
- System::Integer FActiveRecord;
- System::Integer FCurrentRecord;
- Bde::_hDBIObj *FHandle;
- System::Boolean FBOF;
- System::Boolean FEOF;
- TDataSetState FState;
- System::Boolean FAutoCalcFields;
- System::Boolean FDefaultFields;
- System::Boolean FCanModify;
- System::Boolean FModified;
- System::Boolean FStreamedActive;
- System::Boolean FInfoQueryMode;
- TDataSetState FDisableState;
- TDataEvent FEnableEvent;
- System::Boolean FFiltered;
- System::Boolean FFound;
- Bde::RECProps FRecProps;
- System::Integer FRawFieldCount;
- System::Word FRecordSize;
- System::Word FBookmarkSize;
- System::Word FRecInfoOfs;
- System::Word FBookmarkOfs;
- TRecNoStatus FRecNoStatus;
- System::Word FKeySize;
- System::Boolean FExpIndex;
- System::Boolean FCaseInsIndex;
- System::Word FCalcFieldsSize;
- System::Word FRecBufSize;
- System::Integer FDisableCount;
- TDataLink *FFirstDataLink;
- void *FLocale;
- TDataSetDesigner *FDesigner;
- TKeyBuffer *FKeyBuffers[6];
- TKeyBuffer *FKeyBuffer;
- System::Char *FCalcBuffer;
- System::AnsiString FFilterText;
- TFilterOptions FFilterOptions;
- Bde::_hDBIObj *FExprFilter;
- Bde::_hDBIObj *FFuncFilter;
- System::Char *FFilterBuffer;
- System::Integer FIndexFieldCount;
- System::Word FIndexFieldMap[16];
- System::Boolean FBDECalcFields;
- System::Boolean FCachedUpdates;
- Bde::DELAYUPDCbDesc *FUpdateCBBuf;
- TBDECallback *FUpdateCallback;
- System::Boolean FInUpdateCallback;
- System::Word FUpdateErrCode;
- TBDECallback *FAsyncCallback;
- CBYieldStep FCBYieldStep;
- TOnServerYieldEvent FOnServerYield;
- TDataSetUpdateObject *FUpdateObject;
- TDataSetNotifyEvent FBeforeOpen;
- TDataSetNotifyEvent FAfterOpen;
- TDataSetNotifyEvent FBeforeClose;
- TDataSetNotifyEvent FAfterClose;
- TDataSetNotifyEvent FBeforeInsert;
- TDataSetNotifyEvent FAfterInsert;
- TDataSetNotifyEvent FBeforeEdit;
- TDataSetNotifyEvent FAfterEdit;
- TDataSetNotifyEvent FBeforePost;
- TDataSetNotifyEvent FAfterPost;
- TDataSetNotifyEvent FBeforeCancel;
- TDataSetNotifyEvent FAfterCancel;
- TDataSetNotifyEvent FBeforeDelete;
- TDataSetNotifyEvent FAfterDelete;
- TDataSetNotifyEvent FOnNewRecord;
- TDataSetNotifyEvent FOnCalcFields;
- TUpdateErrorEvent FOnUpdateError;
- TUpdateRecordEvent FOnUpdateRecord;
- TFilterRecordEvent FOnFilterRecord;
- TDataSetErrorEvent FOnEditError;
- TDataSetErrorEvent FOnPostError;
- TDataSetErrorEvent FOnDeleteError;
- void __fastcall ActivateBuffers(void);
- void __fastcall ActivateFilters(void);
- void __fastcall AddDataSource(TDataSource *DataSource);
- void __fastcall AddField(TField *Field);
- void __fastcall AddRecord(const TVarRec *Values, const System::Integer Values_Size, System::Boolean
- Append);
- void __fastcall AllocKeyBuffers(void);
- void __fastcall AllocDelUpdCBBuf(System::Boolean Allocate);
- void __fastcall BeginInsertAppend(void);
- void __fastcall BindFields(System::Boolean Binding);
- Bde::CBRType __fastcall CachedUpdateCallBack(System::Pointer CBInfo);
- void __fastcall CalculateBDEFields(void);
- void __fastcall CalculateFields(void);
- void __fastcall CheckCanModify(void);
- void __fastcall CheckCachedUpdateMode(void);
- void __fastcall CheckFieldName(const System::AnsiString FieldName);
- void __fastcall CheckFieldNames(const System::AnsiString FieldNames);
- void __fastcall CheckOperation(TDataOperation Operation, TDataSetErrorEvent ErrorEvent);
- void __fastcall CheckRequiredFields(void);
- void __fastcall CheckSetKeyMode(void);
- void __fastcall CopyBuffer(System::Integer SourceIndex, System::Integer DestIndex);
- Bde::hDBIFilter __fastcall CreateExprFilter(const System::AnsiString Expr, TFilterOptions Options,
- System::Integer Priority);
- void __fastcall CreateFields(void);
- Bde::hDBIFilter __fastcall CreateFuncFilter(System::Pointer FilterFunc, System::Integer Priority);
- Bde::hDBIFilter __fastcall CreateLookupFilter(Classes::TList *Fields, const System::Variant &Values
- , TLocateOptions Options, System::Integer Priority);
- void __fastcall DeactivateFilters(void);
- System::Word __fastcall DeleteRecord(void);
- void __fastcall DestroyFields(void);
- System::Word __fastcall EditRecord(void);
- void __fastcall EndInsertAppend(void);
- TField *__fastcall FieldByNumber(System::Integer FieldNo);
- System::Boolean __fastcall FindRecord(System::Boolean Restart, System::Boolean GoForward);
- void __fastcall FreeFieldBuffers(void);
- void __fastcall FreeKeyBuffers(void);
- System::Boolean __fastcall GetActive(void);
- System::AnsiString __fastcall GetBookmarkStr(void);
- void __fastcall GetCalcFields(System::Integer Index);
- TField *__fastcall GetField(System::Integer Index);
- System::Integer __fastcall GetFieldCount(void);
- System::Variant __fastcall GetFieldValue(const System::AnsiString FieldName);
- void __fastcall GetIndexInfo(void);
- System::Boolean __fastcall GetNextRecord(void);
- System::Integer __fastcall GetNextRecords(void);
- System::Boolean __fastcall GetPriorRecord(void);
- System::Integer __fastcall GetPriorRecords(void);
- System::Word __fastcall GetRecord(System::Integer Index, TGetMode GetMode);
- System::Longint __fastcall GetRecordCount(void);
- System::Boolean __fastcall GetUpdatesPending(void);
- PKeyBuffer __fastcall InitKeyBuffer(PKeyBuffer Buffer);
- void __fastcall InitRecord(System::PChar Buffer);
- void __fastcall InternalClose(void);
- void __fastcall InternalOpen(void);
- System::Boolean __fastcall LocateRecord(const System::AnsiString KeyFields, const System::Variant &KeyValues
- , TLocateOptions Options, System::Boolean SyncCursor);
- System::Boolean __fastcall MapsToIndex(Classes::TList *Fields, System::Boolean CaseInsensitive);
- void __fastcall MoveBuffer(System::Integer CurIndex, System::Integer NewIndex);
- void __fastcall PostKeyBuffer(System::Boolean Commit);
- System::Word __fastcall PostRecord(void);
- System::Smallint __stdcall RecordFilter(System::Pointer RecBuf, System::Integer RecNo);
- void __fastcall RemoveDataSource(TDataSource *DataSource);
- void __fastcall RemoveField(TField *Field);
- void __fastcall SetActive(System::Boolean Value);
- void __fastcall SetBookmarkStr(const System::AnsiString Value);
- void __fastcall SetBufferCount(System::Integer Value);
- void __fastcall SetBufListSize(System::Integer Value);
- void __fastcall SetCurrentRecord(System::Integer Index);
- void __fastcall SetField(System::Integer Index, TField *Value);
- void __fastcall SetFieldDefs(TFieldDefs *Value);
- void __fastcall SetFieldValue(const System::AnsiString FieldName, const System::Variant &Value);
- void __fastcall SetFilterData(const System::AnsiString Text, TFilterOptions Options);
- void __fastcall SetFiltered(System::Boolean Value);
- void __fastcall SetFilterHandle(Bde::hDBIFilter &Filter, Bde::hDBIFilter Value);
- void __fastcall SetFilterOptions( TFilterOptions Value);
- void __fastcall SetFilterText(const System::AnsiString Value);
- void __fastcall SetOnFilterRecord(const TFilterRecordEvent Value);
- void __fastcall SetOnUpdateError(TUpdateErrorEvent UpdateEvent);
- void __fastcall SetState(TDataSetState Value);
- void __fastcall UpdateBufferCount(void);
- System::Boolean __fastcall UpdateCallbackRequired(void);
- void __fastcall UpdateFieldDefs(void);
- Bde::CBRType __fastcall YieldCallBack(System::Pointer CBInfo);
-
- protected:
- void __fastcall CheckInactive(void);
- void __fastcall ClearBuffers(void);
- virtual void __fastcall CloseCursor(void);
- virtual Bde::hDBICur __fastcall CreateHandle(void);
- virtual void __fastcall DataEvent(TDataEvent Event, System::Longint Info);
- virtual void __fastcall DestroyHandle(void);
- virtual void __fastcall DestroyLookupCursor(void);
- virtual void __fastcall DoAfterCancel(void);
- virtual void __fastcall DoAfterClose(void);
- virtual void __fastcall DoAfterDelete(void);
- virtual void __fastcall DoAfterEdit(void);
- virtual void __fastcall DoAfterInsert(void);
- virtual void __fastcall DoAfterOpen(void);
- virtual void __fastcall DoAfterPost(void);
- virtual void __fastcall DoBeforeCancel(void);
- virtual void __fastcall DoBeforeClose(void);
- virtual void __fastcall DoBeforeDelete(void);
- virtual void __fastcall DoBeforeEdit(void);
- virtual void __fastcall DoBeforeInsert(void);
- virtual void __fastcall DoBeforeOpen(void);
- virtual void __fastcall DoBeforePost(void);
- virtual void __fastcall DoOnCalcFields(void);
- virtual void __fastcall DoOnNewRecord(void);
- virtual System::Boolean __fastcall GetCanModify(void);
- virtual TDataSource *__fastcall GetDataSource(void);
- TField *__fastcall GetIndexField(System::Integer Index);
- System::Integer __fastcall GetIndexFieldCount(void);
- PKeyBuffer __fastcall GetKeyBuffer(TKeyIndex KeyIndex);
- System::Boolean __fastcall GetKeyExclusive(void);
- System::Integer __fastcall GetKeyFieldCount(void);
- virtual Bde::hDBICur __fastcall GetLookupCursor(const System::AnsiString KeyFields, System::Boolean
- CaseInsensitive);
- virtual System::Longint __fastcall GetRecordNumber(void);
- virtual void __fastcall InitFieldDefs(void);
- virtual void __fastcall Loaded(void);
- virtual void __fastcall OpenCursor(void);
- virtual void __fastcall PrepareCursor(void);
- System::Boolean __fastcall ResetCursorRange(void);
- System::Boolean __fastcall SetCursorRange(void);
- void __fastcall SetIndexField(System::Integer Index, TField *Value);
- void __fastcall SetKeyBuffer(TKeyIndex KeyIndex, System::Boolean Clear);
- void __fastcall SetKeyExclusive(System::Boolean Value);
- void __fastcall SetKeyFieldCount(System::Integer Value);
- void __fastcall SetKeyFields(TKeyIndex KeyIndex, const TVarRec *Values, const System::Integer Values_Size
- );
- void __fastcall SetLinkRanges(Classes::TList *MasterFields);
- void __fastcall SetLocale(System::Pointer Value);
- virtual void __fastcall SetName(const System::AnsiString Value);
- void __fastcall SwitchToIndex(const System::AnsiString IndexName, const System::AnsiString TagName)
- ;
- virtual void __fastcall GetChildren(Classes::TGetChildProc Proc);
- virtual void __fastcall SetChildOrder(Classes::TComponent *Component, System::Integer Order);
- __property System::Boolean InfoQueryMode = {read=FInfoQueryMode, nodefault};
- void __fastcall SetCachedUpdates(System::Boolean Value);
- void __fastcall SetupCallBack(System::Boolean Value);
- System::Word __fastcall ProcessUpdates(Bde::DBIDelayedUpdCmd UpdCmd);
- TUpdateRecordTypes __fastcall GetUpdateRecordSet(void);
- void __fastcall SetUpdateRecordSet( TUpdateRecordTypes RecordTypes);
- void __fastcall SetUpdateObject(TDataSetUpdateObject *Value);
- System::Boolean __fastcall ForceUpdateCallback(void);
-
- public:
- __fastcall virtual TDataSet(Classes::TComponent *AOwner);
- __fastcall virtual ~TDataSet(void);
- System::PChar __fastcall ActiveBuffer(void);
- void __fastcall Append(void);
- void __fastcall AppendRecord(const TVarRec *Values, const System::Integer Values_Size);
- void __fastcall Cancel(void);
- void __fastcall CheckBrowseMode(void);
- void __fastcall ClearFields(void);
- void __fastcall Close(void);
- System::Boolean __fastcall ControlsDisabled(void);
- void __fastcall CursorPosChanged(void);
- void __fastcall Delete(void);
- void __fastcall DisableControls(void);
- void __fastcall Edit(void);
- void __fastcall EnableControls(void);
- void __fastcall FetchAll(void);
- TField *__fastcall FieldByName(const System::AnsiString FieldName);
- TField *__fastcall FindField(const System::AnsiString FieldName);
- System::Boolean __fastcall FindFirst(void);
- System::Boolean __fastcall FindLast(void);
- System::Boolean __fastcall FindNext(void);
- System::Boolean __fastcall FindPrior(void);
- void __fastcall First(void);
- void __fastcall FreeBookmark(System::Pointer Bookmark);
- System::Pointer __fastcall GetBookmark(void);
- System::Boolean __fastcall GetCurrentRecord(System::PChar Buffer);
- void __fastcall GetFieldList(Classes::TList *List, const System::AnsiString FieldNames);
- void __fastcall GetFieldNames(Classes::TStrings *List);
- void __fastcall GotoBookmark(System::Pointer Bookmark);
- void __fastcall Insert(void);
- void __fastcall InsertRecord(const TVarRec *Values, const System::Integer Values_Size);
- System::Boolean __fastcall IsLinkedTo(TDataSource *DataSource);
- void __fastcall Last(void);
- System::Boolean __fastcall Locate(const System::AnsiString KeyFields, const System::Variant &KeyValues
- , TLocateOptions Options);
- System::Variant __fastcall Lookup(const System::AnsiString KeyFields, const System::Variant &KeyValues
- , const System::AnsiString ResultFields);
- System::Integer __fastcall MoveBy(System::Integer Distance);
- void __fastcall Next(void);
- void __fastcall Open(void);
- void __fastcall Post(void);
- void __fastcall Prior(void);
- void __fastcall Refresh(void);
- void __fastcall Resync( TResyncMode Mode);
- void __fastcall SetFields(const TVarRec *Values, const System::Integer Values_Size);
- void __fastcall SetDetailFields(Classes::TList *MasterFields);
- void __fastcall UpdateCursorPos(void);
- void __fastcall UpdateRecord(void);
- void __fastcall ApplyUpdates(void);
- void __fastcall CommitUpdates(void);
- void __fastcall CancelUpdates(void);
- void __fastcall RevertRecord(void);
- TUpdateStatus __fastcall UpdateStatus(void);
- __property System::Boolean BOF = {read=FBOF, nodefault};
- __property System::AnsiString Bookmark = {read=GetBookmarkStr, write=SetBookmarkStr, nodefault};
- __property System::Boolean CanModify = {read=GetCanModify, nodefault};
- __property TDataSource * DataSource = {read=GetDataSource, nodefault};
- __property System::Boolean DefaultFields = {read=FDefaultFields, nodefault};
- __property TDataSetDesigner * Designer = {read=FDesigner, nodefault};
- __property System::Boolean Eof = {read=FEOF, nodefault};
- __property System::Boolean ExpIndex = {read=FExpIndex, nodefault};
- __property System::Integer FieldCount = {read=GetFieldCount, nodefault};
- __property TFieldDefs * FieldDefs = {read=FFieldDefs, write=SetFieldDefs, nodefault};
- __property TField * Fields[System::Integer Index] = {read=GetField, write=SetField};
- __property System::Variant FieldValues[System::AnsiString FieldName] = {read=GetFieldValue, write=SetFieldValue
- /*, default*/};
- __property System::Boolean Found = {read=FFound, nodefault};
- __property Bde::hDBICur Handle = {read=FHandle, nodefault};
- __property System::Word KeySize = {read=FKeySize, nodefault};
- __property System::Pointer Locale = {read=FLocale, nodefault};
- __property System::Boolean Modified = {read=FModified, nodefault};
- __property System::Longint RecordCount = {read=GetRecordCount, nodefault};
- __property System::Longint RecNo = {read=GetRecordNumber, nodefault};
- __property System::Word RecordSize = {read=FRecordSize, nodefault};
- __property TDataSetState State = {read=FState, nodefault};
- __property TDataSetUpdateObject * UpdateObject = {read=FUpdateObject, write=SetUpdateObject, nodefault
- };
- __property TUpdateRecordTypes UpdateRecordTypes = {read=GetUpdateRecordSet, write=SetUpdateRecordSet
- , nodefault};
- __property System::Boolean UpdatesPending = {read=GetUpdatesPending, nodefault};
-
- __published:
- __property System::Boolean Active = {read=GetActive, write=SetActive, default=0};
- __property System::Boolean AutoCalcFields = {read=FAutoCalcFields, write=FAutoCalcFields, default=1
- };
- __property System::Boolean CachedUpdates = {read=FCachedUpdates, write=SetCachedUpdates, default=0}
- ;
- __property System::AnsiString Filter = {read=FFilterText, write=SetFilterText, nodefault};
- __property System::Boolean Filtered = {read=FFiltered, write=SetFiltered, default=0};
- __property TFilterOptions FilterOptions = {read=FFilterOptions, write=SetFilterOptions, default=0};
-
- __property TDataSetNotifyEvent BeforeOpen = {read=FBeforeOpen, write=FBeforeOpen};
- __property TDataSetNotifyEvent AfterOpen = {read=FAfterOpen, write=FAfterOpen};
- __property TDataSetNotifyEvent BeforeClose = {read=FBeforeClose, write=FBeforeClose};
- __property TDataSetNotifyEvent AfterClose = {read=FAfterClose, write=FAfterClose};
- __property TDataSetNotifyEvent BeforeInsert = {read=FBeforeInsert, write=FBeforeInsert};
- __property TDataSetNotifyEvent AfterInsert = {read=FAfterInsert, write=FAfterInsert};
- __property TDataSetNotifyEvent BeforeEdit = {read=FBeforeEdit, write=FBeforeEdit};
- __property TDataSetNotifyEvent AfterEdit = {read=FAfterEdit, write=FAfterEdit};
- __property TDataSetNotifyEvent BeforePost = {read=FBeforePost, write=FBeforePost};
- __property TDataSetNotifyEvent AfterPost = {read=FAfterPost, write=FAfterPost};
- __property TDataSetNotifyEvent BeforeCancel = {read=FBeforeCancel, write=FBeforeCancel};
- __property TDataSetNotifyEvent AfterCancel = {read=FAfterCancel, write=FAfterCancel};
- __property TDataSetNotifyEvent BeforeDelete = {read=FBeforeDelete, write=FBeforeDelete};
- __property TDataSetNotifyEvent AfterDelete = {read=FAfterDelete, write=FAfterDelete};
- __property TDataSetNotifyEvent OnNewRecord = {read=FOnNewRecord, write=FOnNewRecord};
- __property TDataSetNotifyEvent OnCalcFields = {read=FOnCalcFields, write=FOnCalcFields};
- __property TFilterRecordEvent OnFilterRecord = {read=FOnFilterRecord, write=SetOnFilterRecord};
- __property TOnServerYieldEvent OnServerYield = {read=FOnServerYield, write=FOnServerYield};
- __property TUpdateErrorEvent OnUpdateError = {read=FOnUpdateError, write=SetOnUpdateError};
- __property TUpdateRecordEvent OnUpdateRecord = {read=FOnUpdateRecord, write=FOnUpdateRecord};
- __property TDataSetErrorEvent OnEditError = {read=FOnEditError, write=FOnEditError};
- __property TDataSetErrorEvent OnPostError = {read=FOnPostError, write=FOnPostError};
- __property TDataSetErrorEvent OnDeleteError = {read=FOnDeleteError, write=FOnDeleteError};
- };
-
- class __declspec(pascalimplementation) TDataSetDesigner : public System::TObject
- {
- typedef TDataSetDesigner ThisClass;
- typedef System::TObject inherited;
-
- private:
- TDataSet *FDataSet;
- System::Boolean FSaveActive;
- System::Byte FReserved;
-
- public:
- __fastcall TDataSetDesigner(TDataSet *DataSet);
- __fastcall virtual ~TDataSetDesigner(void);
- void __fastcall BeginDesign(void);
- virtual void __fastcall DataEvent(TDataEvent Event, System::Longint Info);
- void __fastcall EndDesign(void);
- __property TDataSet * DataSet = {read=FDataSet, nodefault};
- };
-
- typedef System::TMetaClass *TFieldClass;
-
- class __declspec(pascalimplementation) TFieldDef : public System::TObject
- {
- typedef TFieldDef ThisClass;
- typedef System::TObject inherited;
-
- private:
- TFieldDefs *FOwner;
- System::AnsiString FName;
- TFieldType FDataType;
- System::Boolean FRequired;
- System::Boolean FBDECalcField;
- System::Word FSize;
- System::Integer FFieldNo;
- System::TMetaClass * __fastcall GetFieldClass(void);
-
- public:
- __fastcall TFieldDef(TFieldDefs *Owner, const System::AnsiString Name, TFieldType DataType, System::Word
- Size, System::Boolean Required, System::Integer FieldNo);
- __fastcall virtual ~TFieldDef(void);
- TField *__fastcall CreateField(Classes::TComponent *Owner);
- __property System::Boolean BDECalcField = {read=FBDECalcField, nodefault};
- __property TFieldType DataType = {read=FDataType, nodefault};
- __property System::TMetaClass * FieldClass = {read=GetFieldClass, nodefault};
- __property System::Integer FieldNo = {read=FFieldNo, nodefault};
- __property System::AnsiString Name = {read=FName, nodefault};
- __property System::Boolean Required = {read=FRequired, nodefault};
- __property System::Word Size = {read=FSize, nodefault};
- };
-
- typedef void *TBookmark;
-
- typedef System::AnsiString TBookmarkStr;
-
- struct DB_31
- {
-
- } ;
-
- struct TKeyBuffer
- {
- System::Boolean Modified;
- System::Boolean Exclusive;
- System::Integer FieldCount;
- DB_31 Data;
- } ;
-
- struct TRecInfo;
- typedef TRecInfo *PRecInfo;
-
- struct TRecInfo
- {
- TUpdateStatus UpdateStatus;
- System::Longint RecordNumber;
- } ;
-
- enum TUpdateMode { upWhereAll, upWhereChanged, upWhereKeyOnly };
-
- typedef Set<System::Shortint, 0, 15> TDBFlags;
-
- class __declspec(pascalimplementation) TDBDataSet : public TDataSet
- {
- typedef TDBDataSet ThisClass;
- typedef TDataSet inherited;
-
- private:
- TDBFlags FDBFlags;
- TUpdateMode FUpdateMode;
- System::Byte FReserved;
- TDatabase *FDatabase;
- System::AnsiString FDatabaseName;
- System::AnsiString FSessionName;
- void __fastcall CheckDBSessionName(void);
- System::Boolean __fastcall GetDBFlag(System::Integer Flag);
- Bde::hDBIDb __fastcall GetDBHandle(void);
- System::Pointer __fastcall GetDBLocale(void);
- TSession *__fastcall GetDBSession(void);
- void __fastcall SetDatabaseName(const System::AnsiString Value);
- void __fastcall SetSessionName(const System::AnsiString Value);
- void __fastcall SetUpdateMode(const TUpdateMode Value);
-
- protected:
- virtual void __fastcall CloseCursor(void);
- virtual void __fastcall Disconnect(void);
- virtual void __fastcall OpenCursor(void);
- virtual void __fastcall SetDBFlag(System::Integer Flag, System::Boolean Value);
- __property TDBFlags DBFlags = {read=FDBFlags, nodefault};
- __property TUpdateMode UpdateMode = {read=FUpdateMode, write=SetUpdateMode, default=0};
-
- public:
- System::Boolean __fastcall CheckOpen(System::Word Status);
- __property TDatabase * Database = {read=FDatabase, nodefault};
- __property Bde::hDBIDb DBHandle = {read=GetDBHandle, nodefault};
- __property System::Pointer DBLocale = {read=GetDBLocale, nodefault};
- __property TSession * DBSession = {read=GetDBSession, nodefault};
-
- __published:
- __property System::AnsiString DatabaseName = {read=FDatabaseName, write=SetDatabaseName, nodefault}
- ;
- __property System::AnsiString SessionName = {read=FSessionName, write=SetSessionName, nodefault};
- public:
-
- /* !! TDataSet.Create */ __fastcall virtual TDBDataSet(Classes::TComponent *AOwner) : Db::TDataSet(
- AOwner) { }
- /* !! TDataSet.Destroy */ __fastcall virtual ~TDBDataSet(void) { }
-
- };
-
- enum TFieldKind { fkData, fkCalculated, fkLookup };
-
- typedef void __fastcall (__closure *TFieldNotifyEvent)(TField *Sender);
-
- typedef void __fastcall (__closure *TFieldGetTextEvent)(TField *Sender, System::AnsiString &Text, System::Boolean
- DisplayText);
-
- typedef void __fastcall (__closure *TFieldSetTextEvent)(TField *Sender, const System::AnsiString Text
- );
-
- class __declspec(pascalimplementation) TField : public Classes::TComponent
- {
- typedef TField ThisClass;
- typedef Classes::TComponent inherited;
-
- private:
- TDataSet *FDataSet;
- System::AnsiString FFieldName;
- TFieldType FDataType;
- System::Boolean FReadOnly;
- TFieldKind FFieldKind;
- TAlignment FAlignment;
- System::Boolean FVisible;
- System::Boolean FRequired;
- System::Boolean FValidating;
- System::Word FSize;
- System::Word FDataSize;
- System::Integer FFieldNo;
- System::Word FOffset;
- System::Integer FDisplayWidth;
- System::AnsiString FDisplayLabel;
- System::AnsiString FEditMask;
- void *FValueBuffer;
- TDataSet *FLookupDataSet;
- System::AnsiString FKeyFields;
- System::AnsiString FLookupKeyFields;
- System::AnsiString FLookupResultField;
- System::AnsiString FAttributeSet;
- TFieldNotifyEvent FOnChange;
- TFieldNotifyEvent FOnValidate;
- TFieldGetTextEvent FOnGetText;
- TFieldSetTextEvent FOnSetText;
- void __fastcall Bind(System::Boolean Binding);
- void __fastcall CalcLookupValue(void);
- System::Boolean __fastcall GetBDECalcField(void);
- System::Boolean __fastcall GetCalculated(void);
- System::AnsiString __fastcall GetDisplayLabel(void);
- System::AnsiString __fastcall GetDisplayName(void);
- System::AnsiString __fastcall GetDisplayText(void);
- System::Integer __fastcall GetDisplayWidth(void);
- System::AnsiString __fastcall GetEditText(void);
- System::Integer __fastcall GetIndex(void);
- System::Boolean __fastcall GetIsIndexField(void);
- System::Boolean __fastcall GetIsNull(void);
- System::Boolean __fastcall GetLookup(void);
- System::Variant __fastcall GetNewValue(void);
- System::Variant __fastcall GetOldValue(void);
- System::Variant __fastcall GetUpdateValue(TDataSetState ValueState);
- System::Boolean __fastcall IsDisplayLabelStored(void);
- System::Boolean __fastcall IsDisplayWidthStored(void);
- void __fastcall ReadAttributeSet(Classes::TReader *Reader);
- void __fastcall SetAlignment(Classes::TAlignment Value);
- void __fastcall SetCalculated(System::Boolean Value);
- void __fastcall SetDataSet(TDataSet *ADataSet);
- void __fastcall SetDisplayLabel( System::AnsiString Value);
- void __fastcall SetDisplayWidth(System::Integer Value);
- void __fastcall SetEditMask(const System::AnsiString Value);
- void __fastcall SetEditText(const System::AnsiString Value);
- void __fastcall SetFieldKind(TFieldKind Value);
- void __fastcall SetFieldName(const System::AnsiString Value);
- void __fastcall SetIndex(System::Integer Value);
- void __fastcall SetLookup(System::Boolean Value);
- void __fastcall SetLookupDataSet(TDataSet *Value);
- void __fastcall SetLookupKeyFields(const System::AnsiString Value);
- void __fastcall SetLookupResultField(const System::AnsiString Value);
- void __fastcall SetKeyFields(const System::AnsiString Value);
- void __fastcall SetNewValue(const System::Variant &Value);
- void __fastcall SetVisible(System::Boolean Value);
- void __fastcall UpdateDataSize(void);
- void __fastcall WriteAttributeSet(Classes::TWriter *Writer);
-
- protected:
- void __fastcall AccessError(const System::AnsiString TypeName);
- void __fastcall CheckInactive(void);
- virtual void __fastcall Change(void);
- void __fastcall DataChanged(void);
- virtual void __fastcall DefineProperties(Classes::TFiler *Filer);
- virtual void __fastcall FreeBuffers(void);
- virtual System::Boolean __fastcall GetAsBoolean(void);
- virtual System::Currency __fastcall GetAsCurrency(void);
- virtual System::TDateTime __fastcall GetAsDateTime(void);
- virtual System::Double __fastcall GetAsFloat(void);
- virtual System::Longint __fastcall GetAsInteger(void);
- virtual System::AnsiString __fastcall GetAsString(void);
- virtual System::Variant __fastcall GetAsVariant(void);
- System::Boolean __fastcall GetCanModify(void);
- virtual System::Integer __fastcall GetDefaultWidth(void);
- virtual Classes::TComponent *__fastcall GetParentComponent(void);
- virtual void __fastcall GetText( System::AnsiString &Text, System::Boolean DisplayText);
- virtual System::Boolean __fastcall HasParent(void);
- virtual void __fastcall Notification(Classes::TComponent *AComponent, Classes::TOperation Operation
- );
- void __fastcall PropertyChanged(System::Boolean LayoutAffected);
- virtual void __fastcall ReadState(Classes::TReader *Reader);
- virtual void __fastcall SetAsBoolean(System::Boolean Value);
- virtual void __fastcall SetAsCurrency(System::Currency Value);
- virtual void __fastcall SetAsDateTime(System::TDateTime Value);
- virtual void __fastcall SetAsFloat(System::Double Value);
- virtual void __fastcall SetAsInteger(System::Longint Value);
- virtual void __fastcall SetAsString(const System::AnsiString Value);
- virtual void __fastcall SetAsVariant(const System::Variant &Value);
- void __fastcall SetDataType(TFieldType Value);
- void __fastcall SetSize(System::Word Value);
- virtual void __fastcall SetParentComponent(Classes::TComponent *AParent);
- virtual void __fastcall SetText(const System::AnsiString Value);
- virtual void __fastcall SetVarValue(const System::Variant &Value);
-
- public:
- __fastcall virtual TField(Classes::TComponent *AOwner);
- __fastcall virtual ~TField(void);
- virtual void __fastcall Assign(Classes::TPersistent *Source);
- void __fastcall AssignValue(const System::TVarRec &Value);
- virtual void __fastcall Clear(void);
- void __fastcall FocusControl(void);
- System::Boolean __fastcall GetData(System::Pointer Buffer);
- virtual System::Boolean __fastcall IsValidChar(System::Char InputChar);
- void __fastcall SetData(System::Pointer Buffer);
- virtual void __fastcall SetFieldType(TFieldType Value);
- __property System::Boolean AsBoolean = {read=GetAsBoolean, write=SetAsBoolean, nodefault};
- __property System::Currency AsCurrency = {read=GetAsCurrency, write=SetAsCurrency};
- __property System::TDateTime AsDateTime = {read=GetAsDateTime, write=SetAsDateTime};
- __property System::Double AsFloat = {read=GetAsFloat, write=SetAsFloat};
- __property System::Longint AsInteger = {read=GetAsInteger, write=SetAsInteger, nodefault};
- __property System::AnsiString AsString = {read=GetAsString, write=SetAsString, nodefault};
- __property System::Variant AsVariant = {read=GetAsVariant, write=SetAsVariant};
- __property System::AnsiString AttributeSet = {read=FAttributeSet, write=FAttributeSet, nodefault};
- __property System::Boolean BDECalcField = {read=GetBDECalcField, nodefault};
- __property System::Boolean CanModify = {read=GetCanModify, nodefault};
- __property TDataSet * DataSet = {read=FDataSet, write=SetDataSet, stored=false, nodefault};
- __property System::Word DataSize = {read=FDataSize, nodefault};
- __property TFieldType DataType = {read=FDataType, nodefault};
- __property System::AnsiString DisplayName = {read=GetDisplayName, nodefault};
- __property System::AnsiString DisplayText = {read=GetDisplayText, nodefault};
- __property System::AnsiString EditMask = {read=FEditMask, write=SetEditMask, nodefault};
- __property System::AnsiString EditMaskPtr = {read=FEditMask, nodefault};
- __property TFieldKind FieldKind = {read=FFieldKind, write=SetFieldKind, nodefault};
- __property System::Integer FieldNo = {read=FFieldNo, nodefault};
- __property System::Boolean IsIndexField = {read=GetIsIndexField, nodefault};
- __property System::Boolean IsNull = {read=GetIsNull, nodefault};
- __property System::Word Size = {read=FSize, write=SetSize, nodefault};
- __property System::AnsiString Text = {read=GetEditText, write=SetEditText, nodefault};
- __property System::Variant Value = {read=GetAsVariant, write=SetAsVariant};
- __property System::Variant NewValue = {read=GetNewValue, write=SetNewValue};
- __property System::Variant OldValue = {read=GetOldValue};
-
- __published:
- __property Classes::TAlignment Alignment = {read=FAlignment, write=SetAlignment, default=0};
- __property System::Boolean Calculated = {read=GetCalculated, write=SetCalculated, default=0};
- __property System::AnsiString DisplayLabel = {read=GetDisplayLabel, write=SetDisplayLabel, stored=IsDisplayLabelStored
- , nodefault};
- __property System::Integer DisplayWidth = {read=GetDisplayWidth, write=SetDisplayWidth, stored=IsDisplayWidthStored
- , nodefault};
- __property System::AnsiString FieldName = {read=FFieldName, write=SetFieldName, nodefault};
- __property System::Integer Index = {read=GetIndex, write=SetIndex, stored=false, nodefault};
- __property System::Boolean Lookup = {read=GetLookup, write=SetLookup, default=0};
- __property TDataSet * LookupDataSet = {read=FLookupDataSet, write=SetLookupDataSet, nodefault};
- __property System::AnsiString LookupKeyFields = {read=FLookupKeyFields, write=SetLookupKeyFields, nodefault
- };
- __property System::AnsiString LookupResultField = {read=FLookupResultField, write=SetLookupResultField
- , nodefault};
- __property System::AnsiString KeyFields = {read=FKeyFields, write=SetKeyFields, nodefault};
- __property System::Boolean ReadOnly = {read=FReadOnly, write=FReadOnly, default=0};
- __property System::Boolean Required = {read=FRequired, write=FRequired, default=0};
- __property System::Boolean Visible = {read=FVisible, write=SetVisible, default=1};
- __property TFieldNotifyEvent OnChange = {read=FOnChange, write=FOnChange};
- __property TFieldGetTextEvent OnGetText = {read=FOnGetText, write=FOnGetText};
- __property TFieldSetTextEvent OnSetText = {read=FOnSetText, write=FOnSetText};
- __property TFieldNotifyEvent OnValidate = {read=FOnValidate, write=FOnValidate};
- };
-
- //-- var, const, procedure ---------------------------------------------------
- #define dsMaxBufferCount System::Smallint(1024)
- #define dsMaxStringSize System::Smallint(8192)
- #define smTraceBufSize System::Smallint(8199)
- #define dbfOpened System::Byte(0)
- #define dbfPrepared System::Byte(1)
- #define dbfExecSQL System::Byte(2)
- #define dbfTable System::Byte(3)
- #define dbfFieldList System::Byte(4)
- #define dbfIndexList System::Byte(5)
- #define dbfStoredProc System::Byte(6)
- #define dbfExecProc System::Byte(7)
- #define dbfProcDesc System::Byte(8)
- #define dsEditModes 0x1C
- extern TSession *Session;
- extern TSessionList *Sessions;
- extern void __fastcall (*RegisterFieldsProc)(const TFieldClass *FieldClassess, const System::Integer
- FieldClassess_Size);
- extern void __fastcall RegisterBDEInitProc(const TBDEInitProc InitProc);
- extern System::PChar __fastcall AnsiToNative(System::Pointer Locale, const System::AnsiString AnsiStr
- , System::PChar NativeStr, System::Integer MaxLen);
- extern void __fastcall NativeToAnsi(System::Pointer Locale, System::PChar NativeStr, System::AnsiString &
- AnsiStr);
- extern void __fastcall AnsiToNativeBuf(System::Pointer Locale, System::PChar Source, System::PChar Dest
- , System::Integer Len);
- extern void __fastcall NativeToAnsiBuf(System::Pointer Locale, System::PChar Source, System::PChar Dest
- , System::Integer Len);
- extern System::Integer __fastcall NativeCompareStr(System::Pointer Locale, const System::AnsiString
- S1, const System::AnsiString S2, System::Integer Len);
- extern System::Integer __fastcall NativeCompareStrBuf(System::Pointer Locale, const System::PChar S1
- , const System::PChar S2, System::Integer Len);
- extern System::Integer __fastcall NativeCompareText(System::Pointer Locale, const System::AnsiString
- S1, const System::AnsiString S2, System::Integer Len);
- extern System::Integer __fastcall NativeCompareTextBuf(System::Pointer Locale, const System::PChar S1
- , const System::PChar S2, System::Integer Len);
- extern System::AnsiString __fastcall ExtractFieldName(const System::AnsiString Fields, System::Integer
- &Pos);
- extern void __fastcall RegisterFields(const TFieldClass *FieldClasses, const System::Integer FieldClasses_Size
- );
- extern void __fastcall DatabaseError(const System::AnsiString Message);
- extern void __fastcall DBError(System::Word Ident);
- extern void __fastcall DBErrorFmt(System::Word Ident, const TVarRec *Args, const System::Integer Args_Size
- );
- extern void __fastcall DbiError(System::Word ErrorCode);
- extern void __fastcall Check(System::Word Status);
- //-- template instantiations -------------------------------------------------
- template class TDBFlags ;
- template class TResyncMode ;
- template class TUpdateRecordTypes ;
- template class TLocateOptions ;
- template class TFilterOptions ;
- template class TTraceFlags ;
-
- } /* namespace Db */
- #if !defined(NO_IMPLICIT_NAMESPACE_USE)
- using namespace Db;
- #endif
- //-- end unit ----------------------------------------------------------------
- #endif // DB
-