Solved

Access Database Serious Error

Posted on 2014-01-28
15
507 Views
Last Modified: 2014-10-05
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
Comment
Question by:slamond
15 Comments
 
LVL 83

Expert Comment

by:CodeCruiser
Comment Utility
Is it VBA code running in Access or is it VB.NET code?
0
 

Author Comment

by:slamond
Comment Utility
Sorry, I need to correct the tags if possible. It's VBA.
0
 
LVL 20

Expert Comment

by:GrahamMandeno
Comment Utility
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
 

Author Comment

by:slamond
Comment Utility
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
 

Author Comment

by:slamond
Comment Utility
What would be the exact syntax for that code?
0
 
LVL 19

Expert Comment

by:regmigrant
Comment Utility
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
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 
LVL 15

Expert Comment

by:JimFive
Comment Utility
You may want to find out what error Access is reporting before you hide the fact that an error happened.
0
 

Author Comment

by:slamond
Comment Utility
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
 
LVL 15

Expert Comment

by:JimFive
Comment Utility
slamond,
Based on the above comment, can you make sure that the Database Option "Compact on Close" is NOT checked.
0
 

Author Comment

by:slamond
Comment Utility
That option is not selected.
0
 

Accepted Solution

by:
slamond earned 0 total points
Comment Utility
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
 

Author Closing Comment

by:slamond
Comment Utility
It's working at about 95%.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Sometimes drives fill up and we don't know why.  If you don't understand the best way to use the tools available, you may end up being stumped as to why your drive says it's not full when you have no space left!  Here's how you can find out...
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

743 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

18 Experts available now in Live!

Get 1:1 Help Now