How to know if a PC was turned OFF while programs were open

By wtotten1 ·
I am trying to determine if users are turning OFF their computer with my database application open. I'm getting some file corruption.

The EXE for the app and the data files reside on the server. It's not a database such as SQL Server, it's a Visual FoxPro application.

The computers are XP PRO workstations on a Windows 2003 Server LAN.


This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Answers

Collapse -

Don't know much about FoxPro

by Tony Hopkinson In reply to How to know if a PC was t ...

But an 'easy way' might be to write start up to the event log. And then in a proper shutdown ( not on an OnClose event) but in close action of the button or menuitem a nice user has closed the application event.

Then you'll be able to see if things are happening in the proper order.

More difficult would be to trap application shutdown and make sure everything is neat and tidy. But the user can always force a quit (cycle the power if nothing else).

Related Discussions

Related Forums