Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232

    Unanswered: Can you use a batch file to check Access is running.

    We do a lot of automated reporting, using a form's OnTimer Event we can run a whole bunch of reports based on Time().

    This is great, when we're here as if the db crashes, we can just re-open it.

    One of the machines I have simply decides to close Access with no errors, no Dr. Watson and GPFs. This has only ever happened when we're not here, say over a weekend or late at night, so we can;t see whats causing it as there's nothing in any logs.

    What I would like to do is try to get a batch file {or something, I'm open to suggestions} to check to see if Access is running. If it is, then do nothing as it's fine. If however MS Access isn't running then open the db back up.

    I was thinking of using Windows Scheduling to run the batch file, but have no idea how to get it to check to see if Access is running and then how to open the db.

    Any help you could offer would be greatly appreciated. If you think there's another way to do it, then please let me know.

    Thanks in advance.

  2. #2
    Join Date
    Sep 2003
    Location
    MN US
    Posts
    313
    Just throwing this out there. May be a bit of a hack solution...

    What about forcing a shutdown every so often, then reopen with scheduler every hour (or whatever). That would at least ensure it's running most of the time.
    Not sure about checking the processes with a batch file, but it would help me too if it were possible. I'm curious to see if someone has a solution.

    Chris

  3. #3
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232
    It's a good idea, never thought of that one!

    I didn't think about the process thing though. I don't think a batch file is going to be able to do this as I don't think you can check processes. Grrrrrr

    Any ideas guys?

  4. #4
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Have you thought about using the FindWindow API?
    Back to Access ... ADO is not the way to go for speed ...

  5. #5
    Join Date
    Feb 2005
    Location
    England.
    Posts
    232
    Now you see, we're getting out of my area of expertise here.

    Can you point me in the right direction of where to look and I'll investigate further.

    Thanks for the help guys!

  6. #6
    Join Date
    Sep 2004
    Location
    Tampa, FL
    Posts
    520
    You im fairly confident you can check processes with windows scripting.
    Darasen

Posting Permissions

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