I am using Delphi 5 with SQL Server 2000 here.
I created ADOQuery on top of the updated view using the INSTEAD OF DELETE trigger.
The updated view is mainly used to manage soft deletions. It filters out records marked as deleted, and also hides the control column.
Everything works fine when I send DELETE commands directly to the database. I delete the record in the view, and the base table is updated, doing a soft delete as expected.
When I try to use ADOQuery to delete a record, it bypasses the view and deletes the record directly in the base table, so the trigger instead of it never starts on the view.
I also use reference constraints, and deleting because of them is wrong, but I don't know if that matters. This does not happen when issuing delete commands to the view.
Do any of you know how to get around this annoying behavior?
source
share