From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Packed librairies Dynamic call, Database connection not transfered to Vi

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)

0 Kudos
Message 1 of 8
(3,881 Views)

HI WengerR,

 

Could you send us the VI ?

Have you ever successfully logged in to the database ?

 

Best regards,

 

Samir
Ingénieur d'applications
National Instruments - France
0 Kudos
Message 2 of 8
(3,813 Views)

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

0 Kudos
Message 3 of 8
(3,811 Views)

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. 

0 Kudos
Message 4 of 8
(3,761 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 5 of 8
(3,754 Views)

@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

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 6 of 8
(3,752 Views)

When I had this problem it was because I lost the reference in a for loop with zero iterations and no shift register.

Message 7 of 8
(477 Views)

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

0 Kudos
Message 8 of 8
(458 Views)