November 8th, 2012, 10:31 AM
Disable the delete of a DBNavigator
I would like to use the Delete button of TwwDBNavigator to run a routine that sets a flag(a column of a SQL table) of logical deletion to on.
I can put code on BeforeDelete and AfterDelete methods of the associated TADOConnection. My trouble is to avoid that the associated database record been deleted.
Would someone here know how I can do this?
Greetings from São Paulo - Brazil
November 8th, 2012, 03:54 PM
You should be able to abort the operation in the beforedelete method
<tablename>.FieldByName('<Logical Field Name>').Value := <new Value>;