LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database connectivity toolkit

Solved!
Go to solution

Hi all,

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 errorCapture.JPG

 

i attached VI also.... I Hope Some one Can help me..

Thank You in advance

0 Kudos
Message 1 of 12
(2,756 Views)

That's not an error.  That's a crash.

 

It also tells you the best course of action (contact NI) on it.

0 Kudos
Message 2 of 12
(2,718 Views)

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...

 

0 Kudos
Message 3 of 12
(2,713 Views)

Hello.

 

are you trying to connect to the default database the example shows or to another one created by you?

0 Kudos
Message 4 of 12
(2,679 Views)

I t

0 Kudos
Message 5 of 12
(2,671 Views)

Hi,

 

I m trying to use default example vi and database....

If you can help me I will be happy...

 

Thank you.

0 Kudos
Message 6 of 12
(2,671 Views)

HI All,

 

Do we have any solution for this issue ?

0 Kudos
Message 7 of 12
(2,562 Views)

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.

/Y

G# - Award winning reference based OOP for LV, for free! ADDQ VIPM Now on GitHub
"Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
Certified-LabVIEW-Developer
0 Kudos
Message 8 of 12
(2,551 Views)

HI  ,

 

ya it makes some sense . , thanks 

0 Kudos
Message 9 of 12
(2,546 Views)
Solution
Accepted by paripoornan

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:

https://forums.ni.com/t5/LabVIEW/LabVIEW-random-crashing-after-reading-ACCESS-database/td-p/3758949

 

To save you the trip: Replace "Provider=Microsoft.ACE.OLEDB.12.0" with "Provider=Microsoft.Jet.OLEDB.4.0" in the connection string.

 

From https://www.connectionstrings.com/ace-oledb-12-0/info-and-download/:

Please Note!
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...

 

 

0 Kudos
Message 10 of 12
(2,406 Views)