I've been using the JDP Science VIPM package but it has been causing no end of consternation when I try to pass a handle between 4 different packed libraries. The initialize library should open the connection, Test start does a database query, test complete does a transaction and commit, and shutdown closes the connection. I find that it takes too long to open and close a new connection in test start and test complete libraries. I can cheat and package a global that holds the connection handle inside the test start and a separate one inside test complete and load it on the first call to the packed library. The issue with that is the connection count rises by two every time the product is changed, and doesn't clear until the executable is exited. So far I found that if I go into the PostgreSQL package and change the vi to hand out the PGconn U32 directly and accept it rather than the connection, I can then get it to pass through the variant from packed library to packed library. It looks like in the packing process each library creates it's own typedef for the connection and does not hand off well. Generally there is an error in trying to unpack the variant.
I would really prefer to use the library as written rather than modifying it. Does anyone have suggestions on ways to pass the handle through a variant from packed library to packed library? I included a screen shot of some of the attempts to get it to work as the connection handle or as a reference. Here is the difference between the variant when unpacked vs from a packed library.
'PQ Conn' -> PQ Connection.lvclass
'PQ Ref' -> F0C000A7
'Numeric' -> 466326216
'PQ Conn' -> Product Initialize.lvlibp:PQ Connection.lvclass
'PQ Ref' -> 5C7000FC
'Numeric' -> 466328936
As best I can tell wrapper from the packed library makes them incompatible and I have not found any way to get them to translate.
To be fair I also went through the effort of converting everything to ODBC and using those tools with similar problems on passing the handles.