Showing results for 
Search instead for 
Did you mean: 

Random failure to open database using DB Tools Open

Go to solution

I am getting random occurrences of errors when executing the DB Tools Open  This is happening only on one of 16 test stands running exactly the same code.  It is happening on a stand that has been running this code for many weeks without incident.  Now the errors occur around every few hundred times executing the code attached below.  The error code is -2146824584 and seems to be an undefined error.  In the attached PNG, I am showing my code and indicating where within the DB Tools Open the error occurs.  The information passed into this vi is identical every time the program runs and has worked on the other stands and previously on this stand millions of times before without incident.  The connection string shown in the attached graphic is only different from my actual code in the name and path of the database.  Does anyone have any idea as to why I am seeing this random error?  We are using LabVIEW 2016 32 bit and the bitness of Access is the same.  Thanks.  

0 Kudos
Message 1 of 4

Something in your ADO Access Driver installation is not quite right. 

-2146824584 (or in hex notation 800A0E78) is not a random failure but indicates "ADODB.Connection error '800a0e78' Operation is not allowed when the object is closed".


Possibly you use LabVIEW 64-bit but the Access driver is 32-bit? Or you have recently installed Office 365? Then you are supposedly getting trouble trying to use the Microsoft Access OLE drivers 12.0.



Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4

I agree with rolfk that this is an ADO issue.  Try repairing/reinstalling your driver. 

Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 4
Accepted by topic author A1Penguin

This turned out not to be a driver issue.  There was something about the mdb file that was causing the trouble.   I could loop the test program and encounter the error somewhere between 70 and 200 runs.  No fixed number of runs between errors.   I then tried a new empty database file and ran thousands of loops with no trouble. The problematic mdb is only about 450MB in size and we have other stands with databases approaching 1G and running the same code that have no issues.  I then tried the "compact and repair" operation within Access on the problematic mdb but still had errors when running the test code.

Finally, I wrote a LabVIEW program to read data out of the bad mdb file and populate the correct tables in the empty database.  This program ran, much to my surprise, without errors (maybe the problem is only with write operations to the bad mdb database).  The new mdb that I created this way has now worked for over 2500 loops of the test program and so far no errors.  I still have no idea what caused the original mdb file to act up, but since I am up and running now, I am not going to pursue it further.


0 Kudos
Message 4 of 4