Discussion Locked

VFP5.0 need a way to close db's on idle

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Does anyone know a way to setup VFP5.0 to close all databases (issue a command) after a certain amount of time idle. The issuing the command and the timer don't seem hard, but the idle part does.
any thoughts?

3 replies

by bill

This is an ongoing struggle for most of us doing application development.

Thre's no real 'easy' answer to your question.

What we have done is 'sweep' our W2K servers each night to clear sessions and free up the DB's.

One of the problems with closing the files is making sure whatever the user was working on gets saved before you close the DB's up.

If you're looking to do this because open files are interfering with nightly backups.. a number of backup sysytems will now back up open files.

The biggest problem you have in VFP (even more so in 5 than 7) is determining the amount of time the user has been idle, there are API calls that can make that determination, you could combine the API call with a timer that runs say every 30minutes to and if the user has been idle for more than 30 minutes, simply issue the 'exit' commad for the application.

I hope this helps.

This discussion is closed to new replies.