原文:
http://stackoverflow.com/questions/838546/delphi-canceling-a-tdataset-post-in-an-onbeforepost-event
Calling the method Abort
(from the unit System
, if I recall correctly) raises a silent EAbort
exception, which cancels just the current operation. That should work.
(Btw: this method of cancelling a databaset operation is also described somewhere deep in the help system as the 'normal' way to achieve this --- that's where I got this technique from originally).