home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 1997 May
/
Pcwk0597.iso
/
borland
/
cb
/
setup
/
cbuilder
/
data.z
/
DB.HPP
< prev
next >
Wrap
C/C++ Source or Header
|
1997-02-28
|
60KB
|
1,366 lines
//----------------------------------------------------------------------------
// DB.hpp - bcbdcc32 generated hdr (DO NOT EDIT) rev: 0
// From: DB.pas
//----------------------------------------------------------------------------
#ifndef DBHPP
#define DBHPP
//----------------------------------------------------------------------------
#include <Classes.hpp>
#include <Bde.hpp>
#include <Windows.hpp>
#include <SysUtils.hpp>
#include <System.hpp>
#pragma warn -par
#pragma warn -hid
#pragma warn -inl
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 Sysutils::Exception inherited;
public:
/* Exception.Create */ __fastcall EDatabaseError(const System::AnsiString Msg) : Sysutils::Exception(
Msg) { }
/* Exception.CreateFmt */ __fastcall EDatabaseError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Sysutils::Exception(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EDatabaseError(int Ident) : Sysutils::Exception(Ident) { }
/* Exception.CreateResFmt */ __fastcall EDatabaseError(int Ident, const System::TVarRec * Args, const
int Args_Size) : Sysutils::Exception(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EDatabaseError(const System::AnsiString Msg, int AHelpContext
) : Sysutils::Exception(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EDatabaseError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Sysutils::Exception(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EDatabaseError(int Ident, int AHelpContext) : Sysutils::Exception(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EDatabaseError(int Ident, const System::TVarRec * Args,
const int Args_Size, int 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 EDatabaseError inherited;
private:
Classes::TList* FErrors;
TDBError* __fastcall GetError(int Index);
int __fastcall GetErrorCount(void);
public:
__fastcall EDBEngineError(Word ErrorCode);
__fastcall virtual ~EDBEngineError(void);
__property int ErrorCount = {read=GetErrorCount, nodefault};
__property TDBError* Errors[int Index] = {read=GetError};
public:
/* Exception.CreateFmt */ __fastcall EDBEngineError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size) : Db::EDatabaseError(Msg, Args, Args_Size) { }
/* Exception.CreateRes */ __fastcall EDBEngineError(int Ident) : Db::EDatabaseError(Ident) { }
/* Exception.CreateResFmt */ __fastcall EDBEngineError(int Ident, const System::TVarRec * Args, const
int Args_Size) : Db::EDatabaseError(Ident, Args, Args_Size) { }
/* Exception.CreateHelp */ __fastcall EDBEngineError(const System::AnsiString Msg, int AHelpContext
) : Db::EDatabaseError(Msg, AHelpContext) { }
/* Exception.CreateFmtHelp */ __fastcall EDBEngineError(const System::AnsiString Msg, const System::TVarRec
* Args, const int Args_Size, int AHelpContext) : Db::EDatabaseError(Msg, Args, Args_Size, AHelpContext
) { }
/* Exception.CreateResHelp */ __fastcall EDBEngineError(int Ident, int AHelpContext) : Db::EDatabaseError(
Ident, AHelpContext) { }
/* Exception.CreateResFmtHelp */ __fastcall EDBEngineError(int Ident, const System::TVarRec * Args,
const int Args_Size, int AHelpContext) : Db::EDatabaseError(Ident, Args, Args_Size, AHelpContext) { }
};
class __declspec(pascalimplementation) TDBError : public System::TObject
{
typedef System::TObject inherited;
private:
Word FErrorCode;
long FNativeError;
System::AnsiString FMessage;
Byte __fastcall GetCategory(void);
Byte __fastcall GetSubCode(void);
public:
__fastcall TDBError(EDBEngineError* Owner, Word ErrorCode, long NativeError, char * Message);
__property Byte Category = {read=GetCategory, nodefault};
__property Word ErrorCode = {read=FErrorCode, nodefault};
__property Byte SubCode = {read=GetSubCode, nodefault};
__property System::AnsiString Message = {read=FMessage, nodefault};
__property long NativeError = {read=FNativeError, nodefault};
public:
/* TObject.Destroy */ __fastcall virtual ~TDBError(void) { }
};
typedef void *TLocale;
typedef Bde::CBRType __fastcall (__closure *TBDECallbackEvent)(void * CBInfo);
class __declspec(delphiclass) TBDECallback;
class __declspec(pascalimplementation) TBDECallback : public System::TObject
{
typedef System::TObject inherited;
private:
Bde::_hDBIObj *FHandle;
System::TObject* FOwner;
CBType FCBType;
long FOldCBData;
void *FOldCBBuf;
Word FOldCBBufLen;
Bde::pfDBICallBack FOldCBFunc;
bool FInstalled;
TBDECallbackEvent FCallbackEvent;
protected:
Bde::CBRType __fastcall Invoke(Bde::CBType CallType, void * CBInfo);
public:
__fastcall TBDECallback(System::TObject* AOwner, Bde::hDBICur Handle, Bde::CBType CBType, void * CBBuf
, int CBBufSize, TBDECallbackEvent CallbackEvent, bool Chain);
__fastcall virtual ~TBDECallback(void);
};
class __declspec(delphiclass) TSessionList;
class __declspec(delphiclass) TSession;
class __declspec(pascalimplementation) TSessionList : public System::TObject
{
typedef System::TObject inherited;
private:
Classes::TList* FSessions;
void __fastcall AddSession(TSession* ASession);
void __fastcall CloseAll(void);
int __fastcall GetCount(void);
TSession* __fastcall GetSession(int 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 int Count = {read=GetCount, nodefault};
__property TSession* Sessions[int 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, bool &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 DWord __stdcall (*TWriteProc)(System::TObject* Client, char * Data, int Len);
typedef System::TObject* __stdcall (*TSMRegProc)(int Handle, char * ClientName, TWriteProc &WriteProc
, System::TObject* Instance, void * const SignalProc);
class __declspec(delphiclass) TDatabase;
class __declspec(pascalimplementation) TSession : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
Bde::_hDBIObj *FHandle;
bool FDefault;
Classes::TList* FDatabases;
Classes::TList* FCallbacks;
void *FLocale;
int FClientLib;
TSMRegProc FSMRegProc;
TWriteProc FSMWriteProc;
Bde::TRACEDesc *FSMBuffer;
System::TObject* FSMClient;
TTraceFlags FTraceFlags;
bool FStreamedActive;
bool FKeepConnections;
System::AnsiString FSessionName;
System::AnsiString FNetFileDir;
System::AnsiString FPrivateDir;
CBSCType FCBSCType;
bool FDLLDetach;
bool FBDEOwnsLoginCbDb;
int 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(void * CBInfo);
void __fastcall DBNotification(TDatabaseEvent DBEvent, const void *Param);
void __fastcall DeleteConfigPath(const System::AnsiString Path, const System::AnsiString Node);
bool __fastcall GetActive(void);
TConfigMode __fastcall GetConfigMode(void);
TDatabase* __fastcall GetDatabase(int Index);
int __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, bool RestoreMode);
void __fastcall InternalDeleteAlias(const System::AnsiString Name, TConfigMode CfgMode, bool 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(bool Value);
void __fastcall RemoveDatabase(TDatabase* Value);
Bde::CBRType __fastcall ServerCallback(void * CBInfo);
void __fastcall SetActive(bool 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, int Data);
Bde::CBRType __fastcall SqlTraceCallback(void * CBInfo);
void __fastcall StartSession(bool Value);
void __fastcall UnlockSession(void);
protected:
virtual void __fastcall Loaded(void);
__property TDatabaseNotifyEvent OnDBNotify = {read=FOnDBNotify, write=FOnDBNotify};
__property bool 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);
bool __fastcall GetPassword(void);
void __fastcall GetTableNames(const System::AnsiString DatabaseName, const System::AnsiString Pattern
, bool Extensions, bool SystemTables, Classes::TStrings* List);
void __fastcall GetStoredProcNames(const System::AnsiString DatabaseName, Classes::TStrings* List);
bool __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 int DatabaseCount = {read=GetDatabaseCount, nodefault};
__property TDatabase* Databases[int Index] = {read=GetDatabase};
__property Bde::hDBISes Handle = {read=GetHandle, nodefault};
__property void * Locale = {read=FLocale, nodefault};
__property TTraceFlags TraceFlags = {read=FTraceFlags, write=SetTraceFlags, nodefault};
__published:
__property bool Active = {read=GetActive, write=SetActive, default=0};
__property bool 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 System::TObject inherited;
private:
int FFieldCount;
Word FBufSize;
TFieldDescList *FFieldDescs;
char *FBuffer;
public:
__fastcall TParamList(Classes::TStrings* Params);
__fastcall virtual ~TParamList(void);
__property char * Buffer = {read=FBuffer, nodefault};
__property int 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 Classes::TComponent inherited;
private:
Classes::TList* FDataSets;
TTransIsolation FTransIsolation;
bool FLoginPrompt;
bool FKeepConnection;
bool FTemporary;
bool FSessionAlias;
bool FStreamedConnected;
bool FLocaleLoaded;
bool FAliased;
Byte FReserved;
int FRefCount;
Bde::_hDBIObj *FHandle;
bool FSQLBased;
Bde::_hDBIObj *FTransHandle;
void *FLocale;
TSession* FSession;
System::AnsiString FSessionName;
Classes::TStrings* FParams;
System::AnsiString FDatabaseName;
System::AnsiString FDatabaseType;
bool FAcquiredHandle;
TLoginEvent FOnLogin;
void __fastcall CheckActive(void);
void __fastcall CheckInactive(void);
void __fastcall CheckDatabaseName(void);
void __fastcall CheckDatabaseAlias( System::AnsiString &Password);
void __fastcall CheckSessionName(bool Required);
void __fastcall EndTransaction(Bde::eXEnd TransEnd);
System::AnsiString __fastcall GetAliasName(void);
bool __fastcall GetConnected(void);
TDBDataSet* __fastcall GetDataSet(int Index);
int __fastcall GetDataSetCount(void);
System::AnsiString __fastcall GetDirectory(void);
System::AnsiString __fastcall GetDriverName(void);
bool __fastcall GetIsSQLBased(void);
bool __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(bool Value);
void __fastcall SetDatabaseName(const System::AnsiString Value);
void __fastcall SetDatabaseType(const System::AnsiString Value, bool Aliased);
void __fastcall SetDirectory(const System::AnsiString Value);
void __fastcall SetDriverName(const System::AnsiString Value);
void __fastcall SetHandle(Bde::hDBIDb Value);
void __fastcall SetKeepConnection(bool 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(TDBDataSet* const * DataSets, const int 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 int DataSetCount = {read=GetDataSetCount, nodefault};
__property TDBDataSet* DataSets[int Index] = {read=GetDataSet};
__property System::AnsiString Directory = {read=GetDirectory, write=SetDirectory, nodefault};
__property Bde::hDBIDb Handle = {read=FHandle, write=SetHandle, nodefault};
__property bool IsSQLBased = {read=FSQLBased, nodefault};
__property bool InTransaction = {read=GetInTransaction, nodefault};
__property void * Locale = {read=FLocale, nodefault};
__property TSession* Session = {read=FSession, nodefault};
__property bool Temporary = {read=FTemporary, write=FTemporary, nodefault};
__property bool SessionAlias = {read=FSessionAlias, nodefault};
__property TTraceFlags TraceFlags = {read=GetTraceFlags, write=SetTraceFlags, nodefault};
__published:
__property System::AnsiString AliasName = {read=GetAliasName, write=SetAliasName, nodefault};
__property bool 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 bool KeepConnection = {read=FKeepConnection, write=SetKeepConnection, default=1};
__property bool 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 System::TObject inherited;
private:
TDataSet* FDataSet;
Classes::TList* FItems;
bool FUpdated;
Byte FReserved;
int __fastcall GetCount(void);
TFieldDef* __fastcall GetItem(int Index);
public:
__fastcall TFieldDefs(TDataSet* DataSet);
__fastcall virtual ~TFieldDefs(void);
void __fastcall Add(const System::AnsiString Name, TFieldType DataType, Word Size, bool Required);
void __fastcall AddFieldDesc(const Bde::FLDDesc &FieldDesc, bool Required, Word FieldNo);
void __fastcall Assign(TFieldDefs* FieldDefs);
void __fastcall Clear(void);
TFieldDef* __fastcall Find(const System::AnsiString Name);
int __fastcall IndexOf(const System::AnsiString Name);
void __fastcall Update(void);
__property int Count = {read=GetCount, nodefault};
__property TFieldDef* Items[int Index] = {read=GetItem/*, default*/};
};
typedef 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 Classes::TComponent inherited;
private:
TDataSet* FDataSet;
Classes::TList* FDataLinks;
bool FEnabled;
bool FAutoEdit;
TDataSetState FState;
Byte FReserved;
Classes::TNotifyEvent FOnStateChange;
TDataChangeEvent FOnDataChange;
Classes::TNotifyEvent FOnUpdateData;
void __fastcall AddDataLink(TDataLink* DataLink);
void __fastcall DataEvent(TDataEvent Event, long Info);
void __fastcall NotifyDataLinks(TDataEvent Event, long Info);
void __fastcall RemoveDataLink(TDataLink* DataLink);
void __fastcall SetDataSet(TDataSet* ADataSet);
void __fastcall SetEnabled(bool 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);
bool __fastcall IsLinkedTo(TDataSet* DataSet);
__property TDataSetState State = {read=FState, nodefault};
__published:
__property bool AutoEdit = {read=FAutoEdit, write=FAutoEdit, default=1};
__property TDataSet* DataSet = {read=FDataSet, write=SetDataSet, nodefault};
__property bool 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 Classes::TPersistent inherited;
private:
TDataSource* FDataSource;
TDataLink* FNext;
int FBufferCount;
int FFirstRecord;
bool FReadOnly;
bool FActive;
bool FEditing;
bool FUpdating;
bool FDataSourceFixed;
void __fastcall DataEvent(TDataEvent Event, long Info);
int __fastcall GetActiveRecord(void);
TDataSet* __fastcall GetDataSet(void);
int __fastcall GetRecordCount(void);
void __fastcall SetActive(bool Value);
void __fastcall SetActiveRecord(int Value);
void __fastcall SetBufferCount(int Value);
void __fastcall SetDataSource(TDataSource* ADataSource);
void __fastcall SetEditing(bool Value);
void __fastcall SetReadOnly(bool 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(int 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);
bool __fastcall Edit(void);
void __fastcall UpdateRecord(void);
__property bool Active = {read=FActive, nodefault};
__property int ActiveRecord = {read=GetActiveRecord, write=SetActiveRecord, nodefault};
__property int BufferCount = {read=FBufferCount, write=SetBufferCount, nodefault};
__property TDataSet* DataSet = {read=GetDataSet, nodefault};
__property TDataSource* DataSource = {read=FDataSource, write=SetDataSource, nodefault};
__property bool DataSourceFixed = {read=FDataSourceFixed, write=FDataSourceFixed, nodefault};
__property bool Editing = {read=FEditing, nodefault};
__property bool ReadOnly = {read=FReadOnly, write=SetReadOnly, nodefault};
__property int 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, bool &AbortQuery);
class __declspec(delphiclass) TDataSetUpdateObject;
enum TUpdateKind { ukModify, ukInsert, ukDelete };
class __declspec(pascalimplementation) TDataSetUpdateObject : public Classes::TComponent
{
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, bool &Accept);
enum TDataAction { daFail, daAbort, daRetry };
typedef void __fastcall (__closure *TDataSetErrorEvent)(TDataSet* DataSet, EDatabaseError* E, TDataAction
&Action);
typedef 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 Classes::TComponent inherited;
private:
Classes::TList* FFields;
Classes::TList* FDataSources;
TFieldDefs* FFieldDefs;
TBufferList *FBuffers;
int FBufListSize;
int FBufferCount;
int FRecordCount;
int FActiveRecord;
int FCurrentRecord;
Bde::_hDBIObj *FHandle;
bool FBOF;
bool FEOF;
TDataSetState FState;
bool FAutoCalcFields;
bool FDefaultFields;
bool FCanModify;
bool FModified;
bool FStreamedActive;
bool FInfoQueryMode;
TDataSetState FDisableState;
TDataEvent FEnableEvent;
bool FFiltered;
bool FFound;
Bde::RECProps FRecProps;
int FRawFieldCount;
Word FRecordSize;
Word FBookmarkSize;
Word FRecInfoOfs;
Word FBookmarkOfs;
TRecNoStatus FRecNoStatus;
Word FKeySize;
bool FExpIndex;
bool FCaseInsIndex;
Word FCalcFieldsSize;
Word FRecBufSize;
int FDisableCount;
TDataLink* FFirstDataLink;
void *FLocale;
TDataSetDesigner* FDesigner;
TKeyBuffer *FKeyBuffers[6];
TKeyBuffer *FKeyBuffer;
char *FCalcBuffer;
System::AnsiString FFilterText;
TFilterOptions FFilterOptions;
Bde::_hDBIObj *FExprFilter;
Bde::_hDBIObj *FFuncFilter;
char *FFilterBuffer;
int FIndexFieldCount;
Word FIndexFieldMap[16];
bool FBDECalcFields;
bool FCachedUpdates;
Bde::DELAYUPDCbDesc *FUpdateCBBuf;
TBDECallback* FUpdateCallback;
bool FInUpdateCallback;
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 System::TVarRec * Values, const int Values_Size, bool Append);
void __fastcall AllocKeyBuffers(void);
void __fastcall AllocDelUpdCBBuf(bool Allocate);
void __fastcall BeginInsertAppend(void);
void __fastcall BindFields(bool Binding);
Bde::CBRType __fastcall CachedUpdateCallBack(void * 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(int SourceIndex, int DestIndex);
Bde::hDBIFilter __fastcall CreateExprFilter(const System::AnsiString Expr, TFilterOptions Options,
int Priority);
void __fastcall CreateFields(void);
Bde::hDBIFilter __fastcall CreateFuncFilter(void * FilterFunc, int Priority);
Bde::hDBIFilter __fastcall CreateLookupFilter(Classes::TList* Fields, const System::Variant &Values
, TLocateOptions Options, int Priority);
void __fastcall DeactivateFilters(void);
Word __fastcall DeleteRecord(void);
void __fastcall DestroyFields(void);
Word __fastcall EditRecord(void);
void __fastcall EndInsertAppend(void);
TField* __fastcall FieldByNumber(int FieldNo);
bool __fastcall FindRecord(bool Restart, bool GoForward);
void __fastcall FreeFieldBuffers(void);
void __fastcall FreeKeyBuffers(void);
bool __fastcall GetActive(void);
System::AnsiString __fastcall GetBookmarkStr(void);
void __fastcall GetCalcFields(int Index);
TField* __fastcall GetField(int Index);
int __fastcall GetFieldCount(void);
System::Variant __fastcall GetFieldValue(const System::AnsiString FieldName);
void __fastcall GetIndexInfo(void);
bool __fastcall GetNextRecord(void);
int __fastcall GetNextRecords(void);
bool __fastcall GetPriorRecord(void);
int __fastcall GetPriorRecords(void);
Word __fastcall GetRecord(int Index, TGetMode GetMode);
long __fastcall GetRecordCount(void);
bool __fastcall GetUpdatesPending(void);
PKeyBuffer __fastcall InitKeyBuffer(PKeyBuffer Buffer);
void __fastcall InitRecord(char * Buffer);
void __fastcall InternalClose(void);
void __fastcall InternalOpen(void);
bool __fastcall LocateRecord(const System::AnsiString KeyFields, const System::Variant &KeyValues,
TLocateOptions Options, bool SyncCursor);
bool __fastcall MapsToIndex(Classes::TList* Fields, bool CaseInsensitive);
void __fastcall MoveBuffer(int CurIndex, int NewIndex);
void __fastcall PostKeyBuffer(bool Commit);
Word __fastcall PostRecord(void);
short __stdcall RecordFilter(void * RecBuf, int RecNo);
void __fastcall RemoveDataSource(TDataSource* DataSource);
void __fastcall RemoveField(TField* Field);
void __fastcall SetActive(bool Value);
void __fastcall SetBookmarkStr(const System::AnsiString Value);
void __fastcall SetBufferCount(int Value);
void __fastcall SetBufListSize(int Value);
void __fastcall SetCurrentRecord(int Index);
void __fastcall SetField(int 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(bool 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);
bool __fastcall UpdateCallbackRequired(void);
void __fastcall UpdateFieldDefs(void);
Bde::CBRType __fastcall YieldCallBack(void * 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, long 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 bool __fastcall GetCanModify(void);
virtual TDataSource* __fastcall GetDataSource(void);
TField* __fastcall GetIndexField(int Index);
int __fastcall GetIndexFieldCount(void);
PKeyBuffer __fastcall GetKeyBuffer(TKeyIndex KeyIndex);
bool __fastcall GetKeyExclusive(void);
int __fastcall GetKeyFieldCount(void);
virtual Bde::hDBICur __fastcall GetLookupCursor(const System::AnsiString KeyFields, bool CaseInsensitive
);
virtual long __fastcall GetRecordNumber(void);
virtual void __fastcall InitFieldDefs(void);
virtual void __fastcall Loaded(void);
virtual void __fastcall OpenCursor(void);
virtual void __fastcall PrepareCursor(void);
bool __fastcall ResetCursorRange(void);
bool __fastcall SetCursorRange(void);
void __fastcall SetIndexField(int Index, TField* Value);
void __fastcall SetKeyBuffer(TKeyIndex KeyIndex, bool Clear);
void __fastcall SetKeyExclusive(bool Value);
void __fastcall SetKeyFieldCount(int Value);
void __fastcall SetKeyFields(TKeyIndex KeyIndex, const System::TVarRec * Values, const int Values_Size
);
void __fastcall SetLinkRanges(Classes::TList* MasterFields);
void __fastcall SetLocale(void * 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, int Order);
__property bool InfoQueryMode = {read=FInfoQueryMode, nodefault};
void __fastcall SetCachedUpdates(bool Value);
void __fastcall SetupCallBack(bool Value);
Word __fastcall ProcessUpdates(Bde::DBIDelayedUpdCmd UpdCmd);
TUpdateRecordTypes __fastcall GetUpdateRecordSet(void);
void __fastcall SetUpdateRecordSet(TUpdateRecordTypes RecordTypes);
void __fastcall SetUpdateObject(TDataSetUpdateObject* Value);
bool __fastcall ForceUpdateCallback(void);
public:
__fastcall virtual TDataSet(Classes::TComponent* AOwner);
__fastcall virtual ~TDataSet(void);
char * __fastcall ActiveBuffer(void);
void __fastcall Append(void);
void __fastcall AppendRecord(const System::TVarRec * Values, const int Values_Size);
void __fastcall Cancel(void);
void __fastcall CheckBrowseMode(void);
void __fastcall ClearFields(void);
void __fastcall Close(void);
bool __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);
bool __fastcall FindFirst(void);
bool __fastcall FindLast(void);
bool __fastcall FindNext(void);
bool __fastcall FindPrior(void);
void __fastcall First(void);
void __fastcall FreeBookmark(void * Bookmark);
void * __fastcall GetBookmark(void);
bool __fastcall GetCurrentRecord(char * Buffer);
void __fastcall GetFieldList(Classes::TList* List, const System::AnsiString FieldNames);
void __fastcall GetFieldNames(Classes::TStrings* List);
void __fastcall GotoBookmark(void * Bookmark);
HIDESBASE void __fastcall Insert(void);
void __fastcall InsertRecord(const System::TVarRec * Values, const int Values_Size);
bool __fastcall IsLinkedTo(TDataSource* DataSource);
void __fastcall Last(void);
bool __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);
int __fastcall MoveBy(int 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 System::TVarRec * Values, const int 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 bool Bof = {read=FBOF, nodefault};
__property System::AnsiString Bookmark = {read=GetBookmarkStr, write=SetBookmarkStr, nodefault};
__property bool CanModify = {read=GetCanModify, nodefault};
__property TDataSource* DataSource = {read=GetDataSource, nodefault};
__property bool DefaultFields = {read=FDefaultFields, nodefault};
__property TDataSetDesigner* Designer = {read=FDesigner, nodefault};
__property bool Eof = {read=FEOF, nodefault};
__property bool ExpIndex = {read=FExpIndex, nodefault};
__property int FieldCount = {read=GetFieldCount, nodefault};
__property TFieldDefs* FieldDefs = {read=FFieldDefs, write=SetFieldDefs, nodefault};
__property TField* Fields[int Index] = {read=GetField, write=SetField};
__property System::Variant FieldValues[System::AnsiString FieldName] = {read=GetFieldValue, write=SetFieldValue
/*, default*/};
__property bool Found = {read=FFound, nodefault};
__property Bde::hDBICur Handle = {read=FHandle, nodefault};
__property Word KeySize = {read=FKeySize, nodefault};
__property void * Locale = {read=FLocale, nodefault};
__property bool Modified = {read=FModified, nodefault};
__property long RecordCount = {read=GetRecordCount, nodefault};
__property long RecNo = {read=GetRecordNumber, nodefault};
__property 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 bool UpdatesPending = {read=GetUpdatesPending, nodefault};
__published:
__property bool Active = {read=GetActive, write=SetActive, default=0};
__property bool AutoCalcFields = {read=FAutoCalcFields, write=FAutoCalcFields, default=1};
__property bool CachedUpdates = {read=FCachedUpdates, write=SetCachedUpdates, default=0};
__property System::AnsiString Filter = {read=FFilterText, write=SetFilterText, nodefault};
__property bool 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 System::TObject inherited;
private:
TDataSet* FDataSet;
bool FSaveActive;
Byte FReserved;
public:
__fastcall TDataSetDesigner(TDataSet* DataSet);
__fastcall virtual ~TDataSetDesigner(void);
void __fastcall BeginDesign(void);
virtual void __fastcall DataEvent(TDataEvent Event, long Info);
void __fastcall EndDesign(void);
__property TDataSet* DataSet = {read=FDataSet, nodefault};
};
typedef System::TMetaClass*TFieldClass;
class __declspec(pascalimplementation) TFieldDef : public System::TObject
{
typedef System::TObject inherited;
private:
TFieldDefs* FOwner;
System::AnsiString FName;
TFieldType FDataType;
bool FRequired;
bool FBDECalcField;
Word FSize;
int FFieldNo;
System::TMetaClass* __fastcall GetFieldClass(void);
public:
__fastcall TFieldDef(TFieldDefs* Owner, const System::AnsiString Name, TFieldType DataType, Word Size
, bool Required, int FieldNo);
__fastcall virtual ~TFieldDef(void);
TField* __fastcall CreateField(Classes::TComponent* Owner);
__property bool BDECalcField = {read=FBDECalcField, nodefault};
__property TFieldType DataType = {read=FDataType, nodefault};
__property System::TMetaClass* FieldClass = {read=GetFieldClass, nodefault};
__property int FieldNo = {read=FFieldNo, nodefault};
__property System::AnsiString Name = {read=FName, nodefault};
__property bool Required = {read=FRequired, nodefault};
__property Word Size = {read=FSize, nodefault};
};
typedef void *TBookmark;
typedef System::AnsiString TBookmarkStr;
#pragma pack(push, 1)
struct DB_31
{
} ;
#pragma pack(pop)
struct TKeyBuffer
{
bool Modified;
bool Exclusive;
int FieldCount;
DB_31 Data;
} ;
struct TRecInfo;
typedef TRecInfo *PRecInfo;
struct TRecInfo
{
TUpdateStatus UpdateStatus;
long RecordNumber;
} ;
enum TUpdateMode { upWhereAll, upWhereChanged, upWhereKeyOnly };
typedef Set<Shortint, 0, 15> TDBFlags;
class __declspec(pascalimplementation) TDBDataSet : public TDataSet
{
typedef TDataSet inherited;
private:
TDBFlags FDBFlags;
TUpdateMode FUpdateMode;
Byte FReserved;
TDatabase* FDatabase;
System::AnsiString FDatabaseName;
System::AnsiString FSessionName;
void __fastcall CheckDBSessionName(void);
bool __fastcall GetDBFlag(int Flag);
Bde::hDBIDb __fastcall GetDBHandle(void);
void * __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(int Flag, bool Value);
__property TDBFlags DBFlags = {read=FDBFlags, nodefault};
__property TUpdateMode UpdateMode = {read=FUpdateMode, write=SetUpdateMode, default=0};
public:
bool __fastcall CheckOpen(Word Status);
__property TDatabase* Database = {read=FDatabase, nodefault};
__property Bde::hDBIDb DBHandle = {read=GetDBHandle, nodefault};
__property void * 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, bool
DisplayText);
typedef void __fastcall (__closure *TFieldSetTextEvent)(TField* Sender, const System::AnsiString Text
);
class __declspec(pascalimplementation) TField : public Classes::TComponent
{
typedef Classes::TComponent inherited;
private:
TDataSet* FDataSet;
System::AnsiString FFieldName;
TFieldType FDataType;
bool FReadOnly;
TFieldKind FFieldKind;
TAlignment FAlignment;
bool FVisible;
bool FRequired;
bool FValidating;
Word FSize;
Word FDataSize;
int FFieldNo;
Word FOffset;
int 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(bool Binding);
void __fastcall CalcLookupValue(void);
bool __fastcall GetBDECalcField(void);
bool __fastcall GetCalculated(void);
System::AnsiString __fastcall GetDisplayLabel(void);
System::AnsiString __fastcall GetDisplayName(void);
System::AnsiString __fastcall GetDisplayText(void);
int __fastcall GetDisplayWidth(void);
System::AnsiString __fastcall GetEditText(void);
int __fastcall GetIndex(void);
bool __fastcall GetIsIndexField(void);
bool __fastcall GetIsNull(void);
bool __fastcall GetLookup(void);
System::Variant __fastcall GetNewValue(void);
System::Variant __fastcall GetOldValue(void);
System::Variant __fastcall GetUpdateValue(TDataSetState ValueState);
bool __fastcall IsDisplayLabelStored(void);
bool __fastcall IsDisplayWidthStored(void);
void __fastcall ReadAttributeSet(Classes::TReader* Reader);
void __fastcall SetAlignment(Classes::TAlignment Value);
void __fastcall SetCalculated(bool Value);
void __fastcall SetDataSet(TDataSet* ADataSet);
void __fastcall SetDisplayLabel( System::AnsiString Value);
void __fastcall SetDisplayWidth(int 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(int Value);
void __fastcall SetLookup(bool 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(bool 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 bool __fastcall GetAsBoolean(void);
virtual System::Currency __fastcall GetAsCurrency(void);
virtual System::TDateTime __fastcall GetAsDateTime(void);
virtual double __fastcall GetAsFloat(void);
virtual long __fastcall GetAsInteger(void);
virtual System::AnsiString __fastcall GetAsString(void);
virtual System::Variant __fastcall GetAsVariant(void);
bool __fastcall GetCanModify(void);
virtual int __fastcall GetDefaultWidth(void);
virtual Classes::TComponent* __fastcall GetParentComponent(void);
virtual void __fastcall GetText( System::AnsiString &Text, bool DisplayText);
virtual bool __fastcall HasParent(void);
virtual void __fastcall Notification(Classes::TComponent* AComponent, Classes::TOperation Operation
);
void __fastcall PropertyChanged(bool LayoutAffected);
virtual void __fastcall ReadState(Classes::TReader* Reader);
virtual void __fastcall SetAsBoolean(bool Value);
virtual void __fastcall SetAsCurrency(System::Currency Value);
virtual void __fastcall SetAsDateTime(System::TDateTime Value);
virtual void __fastcall SetAsFloat(double Value);
virtual void __fastcall SetAsInteger(long 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(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);
bool __fastcall GetData(void * Buffer);
virtual bool __fastcall IsValidChar(char InputChar);
void __fastcall SetData(void * Buffer);
virtual void __fastcall SetFieldType(TFieldType Value);
__property bool AsBoolean = {read=GetAsBoolean, write=SetAsBoolean, nodefault};
__property System::Currency AsCurrency = {read=GetAsCurrency, write=SetAsCurrency};
__property System::TDateTime AsDateTime = {read=GetAsDateTime, write=SetAsDateTime};
__property double AsFloat = {read=GetAsFloat, write=SetAsFloat};
__property long 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 bool BDECalcField = {read=GetBDECalcField, nodefault};
__property bool CanModify = {read=GetCanModify, nodefault};
__property TDataSet* DataSet = {read=FDataSet, write=SetDataSet, stored=false, nodefault};
__property 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 int FieldNo = {read=FFieldNo, nodefault};
__property bool IsIndexField = {read=GetIsIndexField, nodefault};
__property bool IsNull = {read=GetIsNull, nodefault};
__property 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 bool Calculated = {read=GetCalculated, write=SetCalculated, default=0};
__property System::AnsiString DisplayLabel = {read=GetDisplayLabel, write=SetDisplayLabel, stored=IsDisplayLabelStored
, nodefault};
__property int DisplayWidth = {read=GetDisplayWidth, write=SetDisplayWidth, stored=IsDisplayWidthStored
, nodefault};
__property System::AnsiString FieldName = {read=FFieldName, write=SetFieldName, nodefault};
__property int Index = {read=GetIndex, write=SetIndex, stored=false, nodefault};
__property bool 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 bool ReadOnly = {read=FReadOnly, write=FReadOnly, default=0};
__property bool Required = {read=FRequired, write=FRequired, default=0};
__property bool 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 (Word)(1024)
#define dsMaxStringSize (Word)(8192)
#define smTraceBufSize (Word)(8199)
#define dbfOpened (Byte)(0)
#define dbfPrepared (Byte)(1)
#define dbfExecSQL (Byte)(2)
#define dbfTable (Byte)(3)
#define dbfFieldList (Byte)(4)
#define dbfIndexList (Byte)(5)
#define dbfStoredProc (Byte)(6)
#define dbfExecProc (Byte)(7)
#define dbfProcDesc (Byte)(8)
#define dsEditModes 0x1C
extern TSession* Session;
extern TSessionList* Sessions;
extern void __fastcall (*RegisterFieldsProc)(System::TMetaClass* const * FieldClassess, const int FieldClassess_Size
);
extern void __fastcall RegisterBDEInitProc(const TBDEInitProc InitProc);
extern char * __fastcall AnsiToNative(void * Locale, const System::AnsiString AnsiStr, char * NativeStr
, int MaxLen);
extern void __fastcall NativeToAnsi(void * Locale, char * NativeStr, System::AnsiString &AnsiStr);
extern void __fastcall AnsiToNativeBuf(void * Locale, char * Source, char * Dest, int Len);
extern void __fastcall NativeToAnsiBuf(void * Locale, char * Source, char * Dest, int Len);
extern int __fastcall NativeCompareStr(void * Locale, const System::AnsiString S1, const System::AnsiString
S2, int Len);
extern int __fastcall NativeCompareStrBuf(void * Locale, char * const S1, char * const S2, int Len);
extern int __fastcall NativeCompareText(void * Locale, const System::AnsiString S1, const System::AnsiString
S2, int Len);
extern int __fastcall NativeCompareTextBuf(void * Locale, char * const S1, char * const S2, int Len)
;
extern System::AnsiString __fastcall ExtractFieldName(const System::AnsiString Fields, int &Pos);
extern void __fastcall RegisterFields(System::TMetaClass* const * FieldClasses, const int FieldClasses_Size
);
extern void __fastcall DatabaseError(const System::AnsiString Message);
extern void __fastcall DBError(Word Ident);
extern void __fastcall DBErrorFmt(Word Ident, const System::TVarRec * Args, const int Args_Size);
extern void __fastcall DbiError(Word ErrorCode);
extern void __fastcall Check(Word Status);
extern void __fastcall finalization(void);
//-- template instantiations -------------------------------------------------
template class TDBFlags ;
template class TResyncMode ;
template class TUpdateRecordTypes ;
template class TLocateOptions ;
template class TFilterOptions ;
template class TTraceFlags ;
} /* namespace Db */
#pragma warn .par
#pragma warn .hid
#pragma warn .inl
#if !defined(NO_IMPLICIT_NAMESPACE_USE)
using namespace Db;
#endif
//-- end unit ----------------------------------------------------------------
#endif // DB