|
AnyDAC
|
The event fires, when a DBMS event is fired.
Use the OnAlert event handler to specify an event handler, which will be fired when one of the specified in the Names DBMS events is fired. To start receive event notifications, the events must be registered using the Register method or the Active property. The event handler may be fired in the own event alerter thread (False) or in the main application thread (True), depending on the Options.Synchronize option.
The event handler receives three arguments:
property OnAlert: TADEventAlerterEvent;
procedure TForm1.ADEventAlerter1Alert(ASender: TADCustomEventAlerter; const AEventName: String; const AArgument: Variant); begin if CompareText(AEventName, 'Customers') = 0 then qryCustomers.Refresh else if CompareText(AEventName, 'Orders') = 0 then qryOrders.Refresh; end;
|
What do you think about this topic? Send feedback!
|