TOEDBNavigator - TOEDBNavigator
TOEExtHstmt -
TOENavButton - TNavButton
TOENavDataLink - TOENavDataLink
Register - , SEditRecord
EBeforeUpdateEvent
EErrorEvent
EFetchEvent
ENavClick
TButtonSet
THstmtOperations
TNavButtonStyle
TNavGlyph
TNavigateBtn
TOnInsertEvent
InitRepeatPause
RepeatPause
SpaceSize
procedure Register;
, SEditRecord
EBeforeUpdateEvent = procedure (Sender: TObject; var bUpdate: Boolean) of object
EErrorEvent = procedure (Sender: TObject; Msg: String; Operation: THstmtOperations) of object
EFetchEvent = procedure (Sender: TObject) of object
size of space between special buttons
ENavClick = procedure (Sender: TObject; Button: TNavigateBtn) of object
TButtonSet = set of TNavigateBtn
, nbEdit
THstmtOperations = (oDelete, oUpdate, oRefresh, oInsert);
TNavButtonStyle = set of (nsAllowTimer, nsFocusRect)
TNavGlyph = (ngEnabled, ngDisabled);
TNavigateBtn = (nbFirst, nbPrior, nbNext, nbLast,
nbInsert, nbDelete{, nbEdit}, nbPost, nbCancel, nbRefresh);
, nbPost, nbCancel, nbRefresh);
TOnInsertEvent = procedure (Sender: TObject; var iContinue: Boolean) of object
InitRepeatPause = 800
------------------------------------------------------------------------------
OENavigator and OEExtHstmt components.
These MUST be used with the ODBCExpress ODBC component set.
Author: Greg Carter, with a lot of help from Borland and OE.
Organization: CRYPTOCard Corporation
Contact: gregc@cryptocard.com, www.cryptocard.com/pascal.html
Components:
OENavigator is similar to Delphi's built in DBNavigator. Major differences
include
Uses OEExtHstmt as a datasource instead of TDatasource.
OnReturnToBrowse: Use two OEExtHstmt, one to browse data, another for inserting
data. When the Insert button is pressed the OnInsert method
of the Browsing Hstmt is called. Use the OnInsert and After
Insert events of the Hstmt to get user input, execute INSERT
statemets, and position the second Hstmt at the inserted
record. Then when the user presses any of the move buttons(
next, first, prior, last) the OnReturnToBrowse is called. You
can then set the Datasource back to the Browse Hstmt, so it
appears as though you did a positioned Insert.
OEExtHstmt:
Adds a number of events to the THstmt to make it act like a Delphi TTable.
Events include AfterFirst, AfterPrior, AfterNext, AfterLast, AfterCancel, After
Delete, AfterPost, AfterRefresh, BeforeCancel, BeforeDelete, BeforePost,
BeforeRefresh, OnInsert, AfterInsert and OnError.
OnInsert and AfterInsert were added to allow easy integration with OENav.
Note no data is inserted when OnInsert is called. This is only an event
and it is upto the programmer to write the necessary code to insert a record.
OnError will get triggered any time an ODBC error occures during the Post,
Cancel, Refresh or Delete events.
The reason that I did all the cut and pasting for the OENavigator component
instead of just inheriting is that the DBNavigator is part of the BDE Component
set. I did not want any of the BDE api getting linked in, since OE replaces the
BDE.
RepeatPause = 600
pause before repeat timer (ms)
SpaceSize = 5
pause before hint window displays (ms