01-27-2014 08:22 PM
I have done extensive programming with the SQL Toolkit with LabVIEW versions through 6.1. My customer now wants to upgrade to Windows 7, so I am trying to upgrade to LabVIEW 2009 (my latest purchased version) using the Database Connectivity Toolkit, and the SQL Toolkit Compatibility vis. Everything seemed to be going okay with the higher level SQL operations, but I ran into trouble with the Get Column Name.vi.
The pictures below show the problem. The original SQL Toolkit connected the Prepare SQL.vi with the Get Column Name.vi with a cluster of two references, one for connection, and one for sql. The new compatibility vis have a class conflict in the wire because the Prepare SQL.vi contains a cluster with connection, and command references, but the Get Column Name.vi expects a cluster with connection and recordset references.
How do I resolve this conflict?
Thank You.
Dan
01-28-2014 06:28 PM
FreedomDan,
Check out this link I found for SQL compatibility with the Database Connectivity Toolkit. I think it may help you with what you're doing.
http://digital.ni.com/public.nsf/allkb/1F8EF0F0196EAFFB8625745800700F67?OpenDocument
01-28-2014 07:58 PM
Thanks for your response, but my problem remains. Neither the "Get Column Name.vi", nor the "Prepare SQL.vi", which are the two vis showing the wire type conflict, are on the list of vis not replaced with the compatibility vis. Opening the _SQL folder, both of these vis are included in the compatibility vis, yet they will not connect to each other as they did in the original SQL Toolkit.
Thanks again.
Dan
01-29-2014 01:31 AM
I've never worked with the old version of the toolkit, so I don't know how it did things, but looking inside the SQL prep VI, it only generates a command, and the the column name VI wants a recordset. I'm not super familiar with all the internals of ADO, but my understanding is that is standard - you only have the columns after you execute the command and get the recordset back. What you can apparently do here is insert the Execute Prepared SQL VI in the middle and that will return what you need.
I'm not sure why it worked before. Maybe the execute was hidden inside the prep VI or maybe you can get the column names out of the command object before execution. In general, I would recommend considering switching to the newer VIs.
01-29-2014 09:13 PM
Your suggestion worked like a charm. Thank you for the help. This super-complex development that has been on-going for more than a decade (hence the old version of SQL Toolkit) has now been updated and upgraded to run on Windows 7 machines. (I believe this program became a sentient life form in the late ninties!)
Thanks again.
Dan