Results 1 to 4 of 4

Thread: where to restart after crash

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    Background.
    I am writing some VBA for iGrafx which iterates a directory hierarchy, opens diagrams, does something with them, then closes them. This process can take several hours to run. The VBA is flakey and crashes out frequently.

    EDIT: Not my code thats flakey, but the Object Model exposed by the Application.

    Question.
    What is best way to log current position so I can restart where I left off, rather than having to start at the beginning?

    I currently write my position to a log file, then check for its existence. If the file exists I read the number from it and know where to re-start. Is this the way to go, or is there something better?

  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    A log seems to be the easiest way. Alternatively, you could maintain the history of crashes in a database for later analysis or auditing. Or if it's just a few values and you want to hide this, you could write to the registry.
    Wade

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Jul 2000
    Location
    Scotland
    Posts
    184
    Cheers, never thought about writing to the registry. Is this faster than opening-writing-closing a .txt file?

  4. #4
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    I don't think any performance difference would be significant. Each individual value would just be committed sooner and hidden/protected from the user.
    Wade

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width