Hi all,
I have a TOraQuery set to AutoCommitt and RefreshOptions set to roAfterInsert and roAfterUpdate.
I have some secondary processing set to the AfterRefresh event but the AfterRefresh Event doesn't fire on either an new record being entered or a record updated.
The AfterRefresh does, however, fire when a manual refresh is done.
Am I doing something wrong or is this a problem associated with AutoCommitt?
Regards,
Tony
TOraQuery AfterRefresh
After you insert or update a record, only the current record is refreshed using the RefreshRecord method of TOraQuery. But AfterRefresh event handler is called only when the whole dataset is refreshed using the Refresh method.
If you need to get an event when the RefreshRecord method is called, you can add a handler for AfterUpdateExecute event. In this event handler you should check StatementTypes parameter:
If you need to get an event when the RefreshRecord method is called, you can add a handler for AfterUpdateExecute event. In this event handler you should check StatementTypes parameter:
Code: Select all
if stRefresh in StatementTypes then begin
...
end;