Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Recover deleted MySQL records?
Message
 
To
23/01/2007 12:10:08
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
MySQL
Miscellaneous
Thread ID:
01188180
Message ID:
01188247
Views:
21
Does MySQL support triggers?

In Microsoft SQL on important tables we have triggers on update and delete that take the (original if an update) values of the fields in the record and post them to an update_log table that includes the operation done ('UPDATE' or 'DELETE'), the user name, the datetime the operation was done, and all the rest of the fields in the record.

These tables are pruned as part of the database maintenance plan based on age of the operation_date.

This has been a lifesaver on several occasions after people managed to really screw things up on our MS SQL data.

I think you can do this with VFP databases as well although we no longer use VFP databases or tables for storage.

>Please don't be offended if you already know this, but you may consider taking a similar approach in vfp and remote databases. When a record is deleted by a user, stamp it with a date/time. Then have a purging routine dump or even archive records that are older than x days.
>
>In vfp, I so stamp "deleted" records and then I physically delete and pack them later. This empowers the users to recover things on their own.
____________________________________

Don't Tread on Me

Overthrow the federal government NOW!
____________________________________
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform