Subject Changing Deletes
Author robertsc@teleport.com
Hi Folks,

I have an application in which for a specific set of tables deletes
are not allowed and instead a "deleted" flag field in the table is
set to true. this is analogous to the xbase mechanism. I have only
come across one way to do this and that is to use views with triggers
defined. But this raises some problems. If a view is a simple
select with no join then interbase considers the view updatable and
placing triggers will just cause the usual insert to occur + the
trigger action to occur (i.e. you will get double inserts etc). So
what I have been looking at is the exception/when mechanism. I can
raise an exception on the delete and then just do an update, but
interbase continues with the delete after that unless I raise another
exception, but then the update is rolled back.

Any ideas on how to accomplish this? My next step is a dummy join of
some kind in the view to keep IB from automatically updating.

Would it be possible to change the view DDL to include a directive
telling interbase not to update a view? something like:

Create view viewname [noupdate|update] ...

thanks

rob