09-20-2016 04:59 PM
I keep running into an issue when upgrading a program written in labview 2012 to 2015 where everything related to the database connectivity toolkit is completely broken.
Basically I have database reference controls and indicators for each of my subVIs that take a database connection and use it to read/write data from sql server and I wire them in squence. As soon as I open the project in labview 2015, I get a bunch of Conn/Cmd ObjectReference miss-match errors. If I go through my program from start to finish and replace all the controls and indicators with new ones from 2015, those errors will go away, but the subvi will still be non executable due to errors within the database subVIs from the toolkit. I've deleted and replaced every subvi related to the DB toolkit with ones from labview 2015 and the error persists. I practically have to start a whole new project and rewrite everything that touches the database from scratch to get a program that will compile and run. I've also reinstalled labview 2015 from scratch in case the toolkit got corrupted somehow. Has anyone run into this issue or have some idea what's changed with the database toolkit? I've only found one forum on NI that seemed related to the issue I'm having and it was not resolved. Below is a link to some screenshots of what I'm seeing.
Any ideas or help would be greatly appreciated.
Solved! Go to Solution.
09-20-2016 05:19 PM
Is this VI in a project? If so, can you check the dependencies and verify that there's nothing that comes from the old 2012 folder or elsewhere?
It could be that you replaced most but not all of the VIs, or it could be subVIs inside of the database VIs, or it could be that some type definitions from the old program still linger.
09-20-2016 05:31 PM
That was a good suggestion, however I checked the dependencies and the only thing listed is vi.lib which points to my 2015 folder. Within vi.lib is the NI Database API lvlib which is also pointing to my 2015 labview installation.
09-20-2016 05:34 PM
I don't suppose you can post some of these broken files? Diagnosing based off of images is often quite difficult.
09-20-2016 05:45 PM
Sure, the attached subVI is basically a complete routine minus the open/close database connection.
09-20-2016 06:08 PM - edited 09-20-2016 06:13 PM
OK, I can open it, and it has a working run arrow. When I close it, it tells me that I need to save the files as they were opened from an older version (LV 2013). Did you save it back deliberately to 2013?
Additionally it says that one or more subVIs was loaded both from a different location and with a different connection pane.
Basically my working guess at this point is that one or more of your VI library files isn't working any more, since it works on my (relatively) clean install. Can you check your \vi.lib\addons\database folder and subfolders in an explorer window set to Details view to see if any of the "modified" dates don't match up with the rest of the files in there? Like, in the last few days?
Edit: I notice now that the broken wire leads to the "Execute query" VI, which is actually a polymorphic VI. One version takes a Conn object, the other a Cmd object. Can you right-click and choose the "Select type" option to the one on your PC and see if you can change it to the other version?
09-20-2016 06:23 PM
I pulled the version straight from my repository so it would be in the initial way I opened it and found the errors I've been having. I guess it was from 2013 and not 2012. I did see some files had been modified in the past few months whereas most of the files from the database addon were dated 2015, so I'll try repairing through ni max to see if that restores the original versions. If not, I'll reinstall labview again.
Switching the run command subvi to cmd fixes that wire, but the subvi remains unexecutable due to internal errors in the other subvis. I think something has to be messed up in my library files. Thank you very much for looking at this and helping me pinpoint the problem.
09-20-2016 06:33 PM
I found someone in the office who had a fresh install of labview 2016. They opened my subvi and it was not broken on their system. We wired in the open/close database subvi's and it worked as expected. I'll be reinstalling labview tomorrow. Thanks again!