Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Exact and deleted recs - did everybody know this but me?
Message
From
25/07/2006 13:30:59
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
 
To
25/07/2006 13:10:31
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01139176
Message ID:
01139822
Views:
9
>>Funny though, I had this idea to have ...deleted() as ... yesterday, but had an impression that someone already said that :). Comes with long threads.
>
>Naomi first and then Thomas, I think and even Tore and me.
>
>I take it farthest though. A single t/f flag is seldom sufficient. A datetime is the ultimate. You get several extra abilities. A few are: 1, you can see all the records a malicious person deleted in one day - without a complex audit trail. 2 - You can delete records more than one year old and then pack. .T./.F. you can't decide which records to physically delete. 3 - You can recall records deleted in the last 10 minutes.

I love to have a timestamp field on any of my tables (preferably all) and leave to the framework to update them on every write. Now on the deletion... well, deletion is the last write, so yes you can do that. And you can see the record's initial creation time by its PK (if it's an incrementing field) - which taken together gives you a powerful db management tool.

In my DOS framework we had an audit trail table, named (guess :) - spy.dbf. In some cases, it took just a couple demonstrations to prove what the operators did and when, and it not only made debugging much easier, but also gave them the impression that "these guys know everything". Next time they knew they couldn't lie about what happened, and remembered that we used the log to actually help them, and we had their full cooperation: even less debugging time.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Reply
Map
View

Click here to load this message in the networking platform