Solved

Stable program

Posted on 2013-10-28
7
437 Views
Last Modified: 2013-10-28
Hi Experts,

Right now i have a Access DB running as a Task Scheduler. In other words, i have a form with a timer that executes (opens other Databases and runs Macros) 24/7 365 days a year.

The problem is that this Access DB, is not as stable as i was hoping for. I have made a current solution that closes the database by killing it in the Windows Task manager if it has frozen for more than 1 hour. (Don't ask for the solution it is complicated to explain)

I was then thinking of making a Desktop Application in Visual Studio to replace my Access Task Scheduler.

My question is: would a Application programmed correctly in Visual Studio be more stable than Access. I need the program to run 24/7 and if it crashes it should restart. How would i insure that and is it possible?
0
Comment
Question by:DCRAPACCESS
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 39605015
You could try using the Task Scheduler of Windows.

Let it launch your Access app, start your processing from, say, the AutoExec macro, be done, and then quit Access.

/gustav
0
 

Author Comment

by:DCRAPACCESS
ID: 39605021
Hi Gustav,

I have a lot of criteria before opening a Access DB and executing  the Macros. So i would need a Program that i can trust running 24/7 and that is able to make a lot of tests before opening any database. I'm also controlling that the Access Databases don't crashes or ends i a loop and runs for more than 1 hour. So windows Task Scheduler is not an option as i see it.
0
 
LVL 49

Expert Comment

by:Gustav Brock
ID: 39605146
I see. The reliability of the running code would not change by this method, so if that is the problem, not the timer, then you will need something else to watch, as an Access app runs in one thread which cannot control itself.

That you could, I guess, solve with a .Net app with a "performer" and a "watcher" but it is a complete rewrite.

/gustav
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 69

Expert Comment

by:Éric Moreau
ID: 39605226
>> would a Application programmed correctly in Visual Studio be more stable than Access.

I am not a fan of Access but if you introduce the same problem in you VS (C# or VB), you will the same issue of stability!
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 39605318
A .Net app would only be more stable in the sense that it would be a true .EXE and not as sensitive to it's environment like MS Access is.  

 Outside of that, as the others have already said, you would continue to have the same problems your having now.

  I also wanted to kick in however that I have an MS Access App that runs as a task scheduler.   I wrote it because I had issues with certain Access versions/apps hanging at exit under certain OS's (there is a bug in A2000/2003 that generates a C0000005 at exit, which causes the Windows task scheduler to hang on occasion).

 I have it  running in/out of the system tray and have never had it freeze up and don't have any issues using it.

 So the bottom line is you need to look at what your executing.  Your apps need to be very robust, with error handling through out and you need to be following good practices, such as closing objects you open and setting any object variables to nothing.

  What I've found is that Access is actually an excellent tool for this type of use.  With an easy to use incrementally compiled VBA programming language, the ability to talk to other Office products with OLE automation, and being able to use and work with a large number of different datasources at the same time, make it a great "Swiss Army Knife" for getting things done quickly.

Jim.
0
 
LVL 57
ID: 39605329
BTW, here's what my task scheduler looks like.   As you can see, it's modeled after the Windows Task Scheduler.   While it's not as flexible in terms of options, it does handle all the basic scheduling tasks and then some.

It runs 24 x 7 without issue.

Jim.

Access based Task Scheduler
Task Schedule Options
0
 

Author Closing Comment

by:DCRAPACCESS
ID: 39606417
Thanks Jim. This was not what I was hoping to hear, but what i expected. I will only run Office vba code i many different databases, so i will keep using Access, and work even more on insuring all possible errors.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
In Microsoft Access, learn how to “cascade” or have the displayed data of one combo control depend upon what’s entered in another. Base the dependent combo on a query for its row source: Add a reference to the first combo on the form as criteria i…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now