Class TRegisterTable (unit RegisterTable) |
Inherits from
TTable
constructor Create(AOwner: TComponent);
- If the FOnTableChange event is assigned a value, fire the event.
destructor Destroy;
Only surface the event when not in design mode.
procedure CheckForChange(Sender: TObject);
This procedure, by checking the validity of the cursor, will fire off the cbTABLECHANGED callback.
procedure InternalClose;
Unregister the callback.
procedure Loaded;
Free the TTimer object.
procedure RegisterCallback;
Free the memory for the dummy record buffer.
procedure SetCheckInterval(Value: word);
The below code is the best possible tested for LOCAL tables.
procedure SetTableNotify(Value: boolean);
Protected declarations Set the check interval for the event.
procedure UnregisterCallback;
If the table is being closed, unregister the callback first.
property TableChangeNotify : boolean
property TableCheckInterval : word
event OnTableChange : TOnTableChange
Published declarations
TableProperties : CURProps;
Public declarations
FChangeTableNotify : boolean;
Private declarations
FCheckInterval : word;
FCloneCur : hDBICur;
FOnTableChange : TOnTableChange;
FRegistered : boolean;
FValueOnStartup : boolean;
pDummyBuf : pBYTE;
Timer : TTimer;
constructor Create(AOwner: TComponent);
If the FOnTableChange event is assigned a value, fire the event...
destructor Destroy;
Only surface the event when not in design mode...
procedure CheckForChange(Sender: TObject);
This procedure, by checking the validity of the cursor, will fire off the cbTABLECHANGED callback. You can change this procedure to best fit your needs.
procedure InternalClose;
Unregister the callback...
procedure Loaded;
Free the TTimer object...
procedure RegisterCallback;
Free the memory for the dummy record buffer...
procedure SetCheckInterval(Value: word);
The below code is the best possible tested for LOCAL tables. If your application is only used locally, you can remove DbiCheckRefrech.
procedure SetTableNotify(Value: boolean);
Protected declarations
Set the check interval for the event...
procedure UnregisterCallback;
If the table is being closed, unregister the callback first...
property TableChangeNotify : boolean
property TableCheckInterval : word
event OnTableChange : TOnTableChange
Published declarations
TableProperties : CURProps;
Public declarations
FChangeTableNotify : boolean;
Private declarations
FCheckInterval : word;
FCloneCur : hDBICur;
FOnTableChange : TOnTableChange;
FRegistered : boolean;
FValueOnStartup : boolean;
pDummyBuf : pBYTE;
Timer : TTimer;