Question Locked

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

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

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.

Thanks,
Bill

2 replies

by tony hopkinson

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).

This discussion is closed to new replies.