Subject RE: [IBO] Deleting records, or not
Author Dmitry Beloshistov
1) Prevent delete



Procedure TMyQuery.OnBeforeDelete(….);

Begin

Abort; // <- do none

End;



2) If user are posted delete you can do Transaction.Rollback …

3) You can create logging tables for store previos data from edited record and restore data from it if need…



From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com] On Behalf Of Emerson - IBO - Firebird
Sent: Wednesday, November 17, 2010 1:56 PM
To: IBObjects Group
Subject: [IBO] Deleting records, or not





Hi everyone!

Is there any way to "cancel" a delete command in a TIB_Query?

Let me explain: when user delete a record in a TIB_Grid i would like to
cancel this operation and replace the usual behaviour for my own set of
commands.

Maybe in OnBeforeDelete event? But, how i cancel the delete operation?

Thanks!!

Emerson
__________________________________________________
Fale com seus amigos de graça com o novo Yahoo! Messenger
http://br.messenger.yahoo.com/





__________ Information from ESET NOD32 Antivirus, version of virus signature database 5626 (20101117) __________



The message was checked by ESET NOD32 Antivirus.



http://www.esetnod32.ru/.ml



[Non-text portions of this message have been removed]