At 05:30 PM 4/29/2008 +0100, Alan Bourke wrote:

>On Mon, 28 Apr 2008 22:59:54 -0700 (PDT), "Michael Madigan"
> >  Users are leaving their programs open
> > overnight and therefore the batch overnight programs can't run because
> > they can't get exclusive use of the databases.
>
>To my mind the only tidy way to do this and not risk database corruption
...

Generally, you won't get data corruption unless there is an actual update 
occurring when the network connection is cut. I don't know of a good way to 
check for that, but cutting stuff off at like 2am is probably pretty safe.

But if you'd want to be more graceful maybe you might be able to use a 
"signal" file (e.g. "maint.dbo" - in the folder where the db files reside). 
Have the application check for the existence of that file. If it's there, 
stop all operations, close all tables, quit.

You'll need to modify application code to do this of course. I don't think 
there was a native "timer" in FPW 2.6, but I seem to recall some kind of 
loop being required in the main .prg to keep application in place (READ 
EVENTS replaced the need for this loop). So, if you're got that loop, you'd 
put the file check in there somewhere. You could even write the name of the 
logged on user into another file showing the system had to force them out.

Hmm... it's been a long time since I've used FPW. I'm not sure the above 
will work if the user has a data entry window up that has its own "READ" in 
effect..... No looping is going on at that point (I think) - and you don't 
have an independent timer available (not a native Fox code timer that is).

HTH,

-Charlie



_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to