01-12-2017 07:15 AM
I have an application which dynamic call vi in a packed librairies.
The VIs called have all the same connector with 10 clusters and an a DataBase connection.
The data from the cluster are well transfer to the VIs, but not de DataBase connection.
I received the error: NI_Database_API.lvlib:Conn getData.vi"<ERR>Object 0x9D00000 is not valid.
(I'm using Labview 2010)
01-13-2017 02:34 AM
HI WengerR,
Could you send us the VI ?
Have you ever successfully logged in to the database ?
Best regards,
01-13-2017 03:34 AM
The data base connection work fine. If a call directly de vi I have no trouble but when it's packed in a librarie the connection don't work.
My main vi is very big to be able to send you so I create I litle example vi which reproduce my trouble.
I have remove the opening of the database so you'll have to add an opening to your own database and chose a request you want to execute.
The request will be run in the main vi and then in the vi call dynamic.
Best regards
01-30-2017 08:27 AM - edited 01-30-2017 08:28 AM
I think my trouble come from the fact when I packed the libraires the database connecton definition is not keep in the right way. it's probably disconnected from definition.
So My trouble is probably more a trouble with type def.
But I don't find a solution to my problem.
01-30-2017 10:33 AM
I might be wrong, but i think a packed library is a namespace of its own, thus the reference won't work. You'll need to keep track of the ref inside the library through some Open/Close functions.
/Y
01-30-2017 10:41 AM
@Yamaeda wrote:
I might be wrong, but i think a packed library is a namespace of its own, thus the reference won't work. You'll need to keep track of the ref inside the library through some Open/Close functions.
/Y
Either that or the resource (connection) is being cleaned up when the dynamic VI is closed.
Ben
11-02-2023 09:58 PM
When I had this problem it was because I lost the reference in a for loop with zero iterations and no shift register.
11-03-2023 04:43 AM
@hekdude wrote:
When I had this problem it was because I lost the reference in a for loop with zero iterations and no shift register.
The best way to learn not to do that is the hard way 😎.