Cancelling deletes using BeforeDelete

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply

Cancelling deletes using BeforeDelete

Post by chuckbeasley » Wed 21 Dec 2005 17:31

I'm attempting to cancel a delete using Application.MessageBox displayed during the TMyTable.BeforeDelete event. If the user decides not to delete the record (IDNO), I'm issuing the TMyTable.Cancel event. However, the record is still being deleted. Why? Is there any other way to abort the delete?


Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain

Post by GEswin » Wed 21 Dec 2005 17:55

Simply call

Code: Select all

and the delete will be cancelled.


Post by chuckbeasley » Wed 21 Dec 2005 17:57

Thanks! That fixed it.

Post Reply