I m using Labview 2015 Database connectivity example... this example run first time good ... when i tried to run again without closing VI ... its shows following error
i attached VI also.... I Hope Some one Can help me..
Thank You in advance
Solved! Go to Solution.
I understand that....program crash wen I m trying to connect database with sub vi database open connec....
But I want to know why its happening....
I think this may be caused due to connection not closed properly.....
But this is a example vi of LabVIEW....
I doesn't find any reasons yet.... Hope somebody can help me...
From the error it looks like you forgot to close the DB connection before trying to open it again. But it's a slight guess on my part.
Nope - it's not a result of leaving the connection open. He has the "Close Connection" command in his VI.
I was having the same issue accessing an Access back-end table database: First attempt always worked perfectly, but second run hard-crashed LabVIEW with an Access Exception issue. If I then restart LabVIEW and recover & try again, it repeats exactly the same.
This has been solved in the forum here:
To save you the trip: Replace "Provider=Microsoft.ACE.OLEDB.12.0" with "Provider=Microsoft.Jet.OLEDB.4.0" in the connection string.
There are some reported problems with the "Microsoft Access Database Engine 2010 Redistributable" package that seems to arise when using 64 bit windows and 64 bit office 2010 or above. The reported solution is to install the "2007 Office System Driver: Data Connectivity Components" instead.
Read more in this article.
I myself have Windows 7 64-bit, but am using Office 2016 32-bit. I've not tested this solution on a compiled app or on a PC that doesn't have Office Professional installed (with Access). If needed, I suspect PCs without Office can just install the Redistributable package mentioned above.
With the above change, mine now works without crashing when run over and over again. I'd have to assume something is wrong with the "DB Tools Close Connection" vi.
Also - the Known Issues for the 2017 DB Tools include:
|642656||—||Using "Connect to ACCDB Database" Example crashes when run multiple times with Access Database Engin...|