Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1802
  • Last Modified:

Access Database Serious Error

I have designed a system of Scheduled Tasks that do numerous database updates and exporting of reports to HTML: repeating the process of logging in, completing the tasks and then logging out of Windows Server 2008 R2 every 15 minutes. Occasionally, the system fails since Microsoft Access 2010 creates a dialog box announcing that the target database created a serious error the last time it was opened and asking the user if it should be opened. Since there is no human present to reply it just waits.

Using Google Search, I've learned that there is a Disabled Items list that the target database must be removed from. How can this be done via Access' Visual Basic commands (I typically use Open Event code) or via some other command?
0
slamond
Asked:
slamond
1 Solution
 
CodeCruiserCommented:
Is it VBA code running in Access or is it VB.NET code?
0
 
slamondAuthor Commented:
Sorry, I need to correct the tags if possible. It's VBA.
0
 
GrahamMandenoCommented:
Hi slamond

I think you'll find the disabled items list in the registry at this key:

HKCU\Software\Microsoft\Office\14.0\Access\Resiliency\DisabledItems

One solution would be to have the task manager execute a batch file instead of starting Access directly.  The batch file could run a VBscript file which checks the registry for the disabled item entry and deletes it if it is found.  Then the batch file can open the database without a problem.

Best wishes,
Graham Mandeno [Access MVP 1996-2014]
0
What Kind of Coding Program is Right for You?

There are many ways to learn to code these days. From coding bootcamps like Flatiron School to online courses to totally free beginner resources. The best way to learn to code depends on many factors, but the most important one is you. See what course is best for you.

 
slamondAuthor Commented:
To GrahamMaddeno, if you or anyone else can provide the code for what you suggest it would be appreciated. My vbscript skills are limited to IF THEN ELSE.
S.
0
 
slamondAuthor Commented:
What would be the exact syntax for that code?
0
 
regmigrantCommented:
here's a script to delete registry keys - you need to modify it to suit your situation and use with caution!

Dim WSHShell
On Error Resume Next
Set WSHShell = WScript.CreateObject("WScript.Shell")
WSHShell.RegDelete "HKCU\Software\Microsoft\Office\14.0\Access\Resiliency\DisabledItems"    ------ <<< make this specific for you cirsumtances!!!!
set WSHShell = nothing
0
 
JimFiveCommented:
You may want to find out what error Access is reporting before you hide the fact that an error happened.
0
 
slamondAuthor Commented:
For the benefit of any reader that is reviewing this incident from an historical perspective, while waiting for expert advice I had the idea to strategically space the Scheduled Tasks to minimize the chances of conflicting data access. Since taking that action the error has occurred only once. The only downside now is that it will be more difficult for me to follow JimFive's suggestion of isolating the error.

I will keep this question open until I can possibly find an event ID that points to a more specific cause of the error.
0
 
JimFiveCommented:
slamond,
Based on the above comment, can you make sure that the Database Option "Compact on Close" is NOT checked.
0
 
slamondAuthor Commented:
That option is not selected.
0
 
slamondAuthor Commented:
I will close this with the final solution being that I spaced my tasks strategically to avoid conflicts, adding tasks to use the Taskkill command to close any open database before executing each task and adding a task to run the Compact command every hour (to mitigate any potential errors related to corruption in the database). After implementing these additions, the task have run without incident for weeks at a time. The isolated failures that remain seem to be cause by tasks running longer than expected and subsequently getting terminated by the Taskkill command.
0
 
slamondAuthor Commented:
It's working at about 95%.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get 10% Off Your First Squarespace Website

Ready to showcase your work, publish content or promote your business online? With Squarespace’s award-winning templates and 24/7 customer service, getting started is simple. Head to Squarespace.com and use offer code ‘EXPERTS’ to get 10% off your first purchase.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now