Re: How to "undo" a database delete



That is a viable database design idea, too.



Juan T. Llibre
ASP.NET MVP
http://asp.net.do/foros/
Foros de ASP.NET en Español
Ven, y hablemos de ASP.NET...
======================

"tom pester" <Tom.PesterDELETETHISSS@xxxxxxxxxx> wrote in message
news:a1a977a212f1a88c77b7c53c80e68@xxxxxxxxxxxxxxxxxxxxx
>
> Or you could do a soft delete. When the user deletes a row you flip a switch in a
> column, so :
>
> delete from table where id = 8
> becomes
> update table set deleted = true
>
> You can make it transparent for the developer by making a view of the table like this :
>
> Employees_All : a table that has also the deleted records
> Employees : SELECT * FROM Employees where deleted = false
>
> Let me know if you have any more questions...
>
> Cheers,
> Tom Pester
>
>> What I would do is set up an identical set of tables, prefaced
>> "bk_thetablename" and store any records deleted in *that* set of
>> tables.
>>
>> Kind of like an audit trail.
>>
>> That way, although you delete records,
>> you still keep all records, deleted or not, permanently.
>> Juan T. Llibre
>> ASP.NET MVP
>> http://asp.net.do/foros/
>> Foros de ASP.NET en Español
>> Ven, y hablemos de ASP.NET...
>> ======================
>> "Morgan Bachu" <dsfsdfs878@xxxxxxxxxxxxx> wrote in message
>> news:1125397228.770219.294150@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>>
>>> Hello everybody,
>>>
>>> I have an intranet application which is mostly a bunch of data
>>> editing forms.
>>>
>>> The database has about 20 tables all related together.
>>>
>>> Recently somebody deleted a "the wrong record" and the cascade delete
>>> in sql server did its work nicely :(
>>>
>>> When they asked me to put the data back, I looked pretty stupid as I
>>> had no idea how.
>>>
>>> How is this normally done in ASP.NET app?
>>>
>>> Morgan
>>>
>
>


.



Relevant Pages

  • Re: Special Characters in Query String
    ... > ASP.NET MVP ... > Foros de ASP.NET en Español ... > Ven, y hablemos de ASP.NET... ... >> They are identical except for the file encoding. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET 2.0 General Info
    ... ASP.NET MVP ... >> Juan T. Llibre ... >> Foros de ASP.NET en Español ... >> Ven, y hablemos de ASP.NET... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Copying site to cd?
    ... >> ASP.NET MVP ... >> Foros de ASP.NET en Español ... >> Ven, y hablemos de ASP.NET... ... >>> DevelopMentor ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: ASP.NET Starter Kits 2.0 .
    ... Juan T. Llibre ... ASP.NET MVP ... Foros de ASP.NET en Español ... Ven, y hablemos de ASP.NET... ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Win2k3, IIS6, ASP.Net - Server Application Unavailable
    ... Juan T. Llibre ... ASP.NET MVP ... Foros de ASP.NET en Español ... Ven, y hablemos de ASP.NET... ...
    (microsoft.public.dotnet.framework.aspnet)

Loading