-
For my project that uses Access2000, I need to create and maintain an Undo log, which will record all database updations made from a certain point of time to a certain point of time and then if the need be, the application should be able to undo these database updations.
I can record the SQL statements used to update the database fine, but how do I build the Undo functionality?
.
-
If it is simply an Update you want to roll back, you can record StartValue and EndValue and Criteria and to rollback apply:
Code:
UPDATE Table SET Table.Field = "EndValue"
WHERE (((Table.Field)="Criteria"));
You need to be really careful about your criteria having changed so you need to rollback bit by bit!
You can do this more easily in SQL Server by using the Transaction Logs.
Cheers,
P.