Question Revert all Changes made to a Database? (1 Viewer)

Bill Bisco

Custom User Title
Local time
Today, 04:37
Joined
Mar 27, 2009
Messages
92
Dear all,

I'd like to implement in my database some type of testing mode where the user would be able to modify records or add records. They could see how all these numbers change after altering or adding records. They could open and see several forms, and see how the changes in one form affected the other form.

After they're done, or when they close the database, I'd like whatever new records they created to be deleted, and whatever current records they modified to be changed back to what they were.

I am aware of Me.Dirty. Although I am unaware if Access is capable of reverting changes to the level that I'd like.

Is Access capable of doing what I want? Has someone already attempted this?

Sincerely,
Bill
 

jardiamj

Registered User.
Local time
Today, 02:37
Joined
Apr 15, 2009
Messages
59
It sounds interesting!
I haven't done this kind of beauties in Access but I have an idea. I have built a Database in MySQL for a website where I keep track of different versions of the pages in the site by storing them in a table called MySite_Versions. So every time a user edit and save a page my CMS (Content Management System) update the live version of the database and also save the changes in the MySite_Versions. By doing so I can always go back and restore any page to an anterior state.
I think this might be appliclable for what you are trying to do. I it doesn't, my apologize it's just a thought I haven't tried it.
Good Luck. Cheers!
 

DCrake

Remembered
Local time
Today, 10:37
Joined
Jun 8, 2005
Messages
8,632
Let me tell you how I do it. In most of my client/server apps that is used by several users, all of which have their own log in name and password. In addition to these there is also a ghost user call Training with a password of Training. If the user logs in under these credentials (all done before any connection is made to the back end) the app runs a function that changes the links to the back end to a local copy of the back end in the CurrentProject.Path on the users pc. This way you can mess about with the tables, adding, editing, deleting using the training backend. Once the training has been completed and the user logs out/ closes the app. The next time they log in using their own user name and password the app first checks the conenction status and if it finds that it is linked to the training mdb it toggles the linking tables function back to the live data.

This is all seamless and unknown to the user. The best thing about this is not only can it be used to beta test your programming without using dummy records in the live data you can have as many users logged in under training doing different things as they are looking at a local copy of the data on their machine. If there are any structual changes to the live back end then you need to copy a new version to each pc. Ok this is a bit of a bug bare but the end justifies the need.

David
 

evanscamman

Registered User.
Local time
Today, 02:37
Joined
Feb 25, 2007
Messages
274
How about an unbound form with an Update button?
Changes are not saved to a table unless button is pressed.

Evan
 

jardiamj

Registered User.
Local time
Today, 02:37
Joined
Apr 15, 2009
Messages
59
I like DCrake suggestion!, I have learned a new trick today. Next time I will give it a try.
I think you should go for it Bill!
Thanks all. Cheers!
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 10:37
Joined
Sep 12, 2006
Messages
15,692
DC

That sounds very useful, and pretty complex

Getting the functionality together to do that is by no means a five minute job, I am sure - although obviously once done, you retain the techniques for future dbs.
 

CraigDolphin

GrumpyOldMan in Training
Local time
Today, 02:37
Joined
Dec 21, 2005
Messages
1,582
Silly question here: Why not make a master copy of the database, and give a disposable copy to each person you want to train. Let them train with it...then throw away that copy. Your master never gets edited.
 

wiklendt

i recommend chocolate
Local time
Today, 19:37
Joined
Mar 10, 2008
Messages
1,746
Silly question here: Why not make a master copy of the database, and give a disposable copy to each person you want to train. Let them train with it...then throw away that copy. Your master never gets edited.


that's (pretty well) exactly what DCrake said yesterday ;)
 

CraigDolphin

GrumpyOldMan in Training
Local time
Today, 02:37
Joined
Dec 21, 2005
Messages
1,582
LOL
I guess so. His was much fancier though ;) I guess that's why he gets the big bucks, eh? :)
 

DCrake

Remembered
Local time
Today, 10:37
Joined
Jun 8, 2005
Messages
8,632
Based on the discussion here I have created a sample to show the workings. Here is a link to the demo.

Sample database

Read the thread before viewing
 

gemma-the-husky

Super Moderator
Staff member
Local time
Today, 10:37
Joined
Sep 12, 2006
Messages
15,692
not looked at the solution yet

but there will be extra code needed to manage a multiple sets of linked back ends, (or even to make as local copy of linked datatables), and i don't think that just providing a second copy of the database as a test is that easy to do - if the end users arent sophisticated enough to know how to point the dbs to the correct back end.

i should imagine its pretty easy for them to forget which dbs they are in from time ot time anyway.
 

Users who are viewing this thread

Top Bottom