locked
Application should give Indication while shut down RRS feed

  • Question

  • Hi,
    I need to set my application to save entry (e.g LoggedOff) to database if application shuts down abnormally, like power failure or anything else like that.

    What event should be fired to achieve this?

    Thanks
    Furqan
    Sunday, January 9, 2011 9:14 AM

Answers

  • No event will trigger during a power failure! - The whole computer is going to go down.

    Best way to handle things like this is to do the following:

    In the (Load) event, write a log entry that states that the program didn't shut down cleanly EVERY TIME the software runs, and then when the program exits properly - like the user closed the software using the EXIT button, delete the log entry. You could use the (Form Closing) event or something like this.

    This way in the event of a power failure and the program not closing properly you will still have a log entry detailing the date when the event happened.

    Hope this makes sense.

     

    DJ PIP


    ------------------------------------- DJ PIP's Software: www.justpip.com -------------------------------------
    • Proposed as answer by Cor Ligthert Sunday, January 9, 2011 3:47 PM
    • Marked as answer by Kee Poppy Monday, January 17, 2011 3:20 AM
    Sunday, January 9, 2011 11:27 AM