Subject Re: [ib-support] Re: Flagging a deletion rather than delete
Author Martijn Tonies
> > Yes, I agree this is the way to go but I was hoping to be able to mark
> > the record as deleted in a before delete trigger event and somehow
> > prevent the actual deletion from happening. That would save me to have
> > to explain to others (there are quite a few different apps written by
> > different teams using different tools dealing with the same DB) that
> > to delete a record, you in fact have to update that field, they'll see
> > that as a sort of twisted logic, even though it's not.
> >
> > So any pointer in that direction would help me a lot.
>
> Maybe you could write an after delete trigger that re-inserts the record
> with a deleted flag?
> The downside appears when you actually want to delete a row :)
> Well.. maybe not.. the trigger could check if the record is already
> flagged 'D' and re-insert only the ones that are not.. hope that helps.

I don't think this will work with CASCADE DELETE foreign keys or
with foreign keys in general.


With regards,

Martijn Tonies
InterBase Workbench - the developer tool for InterBase & Firebird
Firebird Workbench - the developer tool for Firebird
Upscene Productions
http://www.upscene.com

"This is an object-oriented system.
If we change anything, the users object."