Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Anyway to save the current form enviroment? 1

Status
Not open for further replies.

keepsafe

Programmer
Sep 22, 2009
14
US
Hello,

I have a routine that will backup everything in the database folder to a backup folder. In order to do this I have to close all tables and databases (file in use errors will occurred) and then I will force the user to restart the application because my main form has lost it data enviroment. My question, Is there anyway to save the current form enviroment data enviroment before calling my backup routine and once the backup routine is completed restore the data enviroment so that I do not have to force a restart?

Thanks
John
 
Doug Hennig wrote an article on setting up things to be persistent in FoxTalk a long time ago--the January, 2000, issue of FoxTalk. If you have back issues, you can find it there. If you're a subscriber to FoxRockX, you can find it in the FoxTalk archives at the FoxRockX site. The title was "Persistence without Perspiration."

It's a really nice little framework for storing info between sessions.

Tamar
 
John,

You say you have to force your users to restart the application. Why not do it for them?

In other words, do something like this:

1. User signals that they want to take a backup.

2. Application closes all data and runs the backup.

3. Application does a normal closedown.

4. Application calls itself.

The user need not be aware of any of this.They simply say they want to do a backup, and some time later the application is ready for normal use again.

Of course, it's not really that simple. You'd have to make sure all other users have closed the app as well, but that would apply to any backup scenario.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top