Deleting Records - Should you allow it?

Argggggg!" you exclaim, as you realize you accidentally deleted a record because you were working on live data,

Ok, so, maybe it's never happened to you personally, but it may happen to any user account which can delete records in your database. So what's the best answer. Well, the best answer is to have a full audit trail/log in each solution you create. However, this isn't always the easiest to implement.

Instead, take 10 minutes (or less) and have a great solution for any account which should be allowed to [supposedly] delete records. The goal is not necessarily to eliminate the data from the database, it may be to simply make it so it doesn't apply. Because keeping a historical record is something that always comes in handy!

AttachmentSize
DeletingRecords.zip231.62 KB

Comments

Whilst this is great in preventing users from deleting records in the base table, how do you apply the same script to many tables?

Do I have to write a script for each table?
Or is there a way of applying the script to the "Current Table"?

Chris