LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SQL vs. Data Connection Toolset

HI,
 
I have a VI that is written in the old toolset SQL. I would like to use this one with the data connectivity toolset (DCT) now, but get an error that I can't interpret, the error message is -2146825267 and it occurs at the "Fetch Double Column Data.vi". I guess it is because of the old reference, which was a cluster of 2 elements, connection (I16) and sql (I16). But now is the reference a cluster of refnums. But how do I convert the reference to be able to work with the "Fetch Double Column Data.vi", or what do I change the VI (Fetch Double Column Data) to, to make it work with the new reference? What I want it to do is to retrieve all row data from a previously executed SQL SELECT statement.
 
Thank you!
0 Kudos
Message 1 of 5
(2,690 Views)

As was mentioned in a previous thread, you cannot mix the old SQL Toolkit VIs with the Database Connectivity Toolkit VIs.  They use completely different methods of communicating to databases and their refnums are incompatible.

There is an entire section of the ReadMe file devoted to this very topic.  You can use the Compatibility VIs if you really insist on using the old toolkit.  Otherwise, update to the current one.

0 Kudos
Message 2 of 5
(2,660 Views)
Hi,
 
I am aware that I can't use the different toolkits togehter, but I still can't figure our what is included in the data connectivity toolset (DCT). When I istalled the DCT I deleted the old toolkit, but still, when I find my way to the toolkit through the explorer window I find the file called Addons, and I have three files included in that one, "_SQL", "database" and "simulation". But when I open labview, can just see the database file in the functions palette, why is that? But I assumed that, because the SQL file is still in the toolkit, it would be ok to use the VI's in the SQL file, but it isn't, or?
 
Do you have any suggestions what VI's I should use insted of "Fetch next record.vi", "Fetch double column data.vi", "Fetch Query results.vi" and "Handle null valvue.vi", if they belong to the "old" toolkit?
 
I am a bit confused, as I said, I know I can't use the two toolkits togehter, but I don't even know what VI's that belong to the different kinds.
 
I appriciate all help I can get.
0 Kudos
Message 3 of 5
(2,651 Views)
.VI files that begin with an underscore are not supposed to show up in the pallet. The underscore is intentionally added to "Hide" that VI from the pallet.

Have you tried replacing all SQL related VI's in your project with the ones on the Add-Ons pallet? The Database VI's in your add ons pallet will do ODBC, which can connect you to an SQL or Access database.


0 Kudos
Message 4 of 5
(2,637 Views)

Both the user manual and the readme file for the Database Toolkit describe the compatibility VIs for the old toolkit as well as talk about the new toolkit and examples. 

As far as what "compatibility VIs" are -- whenever NI obsoletes a technology and replaces it with something else, we don't want to just break all the existing code out there.  So a library of "compatibility VIs" will be available for a few versions that look like, behave, and have the same connector panes as the obsoleted technology.  However, inside the compatibility diagrams, the current technology is used. 

0 Kudos
Message 5 of 5
(2,631 Views)