Click here to Skip to main content
15,909,498 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi expert,

Thanks for your attention.

Can anybody guide me on how to keep a track of deleted records
in a sqlserver database table along with deleted datetime and other info.


Thanks in advance for helping.
Posted
Updated 22-Jul-12 20:29pm
v2

Hello Kaushik,

Have you time to go through this article

Hope it will help you. Also thank you for this question. I'll go through that when get time.
 
Share this answer
 
Hi Kaushik,
You can Create History Table that is photicopy of Orginal table But have no constraint
and insert into historical table befor delete this row as

SQL
insert into Hst_TBL1
    SELECT    *    FROM        TBL1
    where       TBL1_Id = @Id


then delete record you want
VB
delete from TBL1 where TBL1_Id = @Id
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900