power off while running exe

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • skadu3
    New Member
    • Sep 2007
    • 9

    power off while running exe

    hi! i want to know that if my vb application is running i.e. the exe and suppose in between that if power goes off and the computer gets switched off. when power comes and we switch on the computer then that exe should run from the same point where it has stopped earier during power off.
  • code937
    New Member
    • Sep 2007
    • 24

    #2
    I think that would depend upon what the application was doing...

    If you're processing data then you could put in a marker about which record you have reached on a query unload event and then when the program starts back up it looks for that marker, if you're not handling data then im not sure how, i'd need to see what you app is doing to carry on with.

    Comment

    • Ali Rizwan
      Banned
      Contributor
      • Aug 2007
      • 931

      #3
      Originally posted by skadu3
      hi! i want to know that if my vb application is running i.e. the exe and suppose in between that if power goes off and the computer gets switched off. when power comes and we switch on the computer then that exe should run from the same point where it has stopped earier during power off.
      Hello
      This is on the type of your app.
      There are two solutions
      1) As said below use marker
      2) Use a configuration file in which after every second or after soome time all of your work or your working state will copied and when the power turns off and on you can load settings from that file it can be a txt file or a database.

      Now tell which solution you choose.
      I can made an example for you.
      GOODLUCK

      Comment

      • skadu3
        New Member
        • Sep 2007
        • 9

        #4
        hi thanks for your reply.
        as i don't know how to use a marker, can you please send me the examples of both the solutions.

        WAITING FOR YOUR REPLY!!!!

        Comment

        • Ali Rizwan
          Banned
          Contributor
          • Aug 2007
          • 931

          #5
          Originally posted by skadu3
          hi thanks for your reply.
          as i don't know how to use a marker, can you please send me the examples of both the solutions.

          WAITING FOR YOUR REPLY!!!!
          I m really very sorry because i cant do this at this time but i ll make it any other time.
          But i too not know about marker i can only make of copying the text to a file.
          But let me know the app you are building is a database or any other.
          If not then you use FSO system for this purpose on a timer control. Which saves all the data in the textboxes, state of checkboxes and other controls in a txt or any other file.
          Let you set 1 second to timer then timer save all the state to the txt file after every 1 second
          You can tell by marker to the person who give the idea.

          I m SORRY buddy

          GOODLUCK
          ALI

          Comment

          Working...