Friday, November 12, 2010

Do not Delete record

You need to restrict user not to delete data from database, instead of that he mark data status as disabled. To do the same you must have "Enabled" column in all of your tables. If user want to delete record he must check that records as enabled='N'.

You must query all data in application using

Same record will be available in database but user should not view. To get this implemented you should create view on table and select all column in it like following statement.

Select * from table1 where enabled='Y';

user will only see enabled data just like he see after delete some data.

No comments:

Post a Comment