LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Database Variant To Data.vi not accepting my variant data

On page 3-14 of the DataBase Connectivity Toolset User Manual, May 2001 Edition,

 

“Because LabVIEW is strongly typed, you must use the Database Variant To Data function located on the Functions>>Database palette to convert the variant data to a LabVIEW data type before you can display the data in standard indicators such as graphs, charts, and LEDs.”

 

Wiring the data terminal of DB Tools Select Data.vi to the database variant input of the Database Variant To Data.vi connects with a broken wire and yields the following error:

 

“Generally, polymorphic terminals accept any wire type connected to them. But sometimes these terminals only accept a limited subset based on other wire types connected to other terminals. The most common cause of this conflict is using the type cast node to cast between incompatible types, such as a 2D array and a string. Check the terminals connected by this wire and change that node to make this wire type acceptable.”

 

I have wired a 2D string array constant to the type terminal of the Database Variant To Data.vi.

 

I have several tables and would like to read them back at string arrays as some columns are strings, some are integers and some floats.  The older version of the toolset would return a 2D string array when replying to a querry.  I'd like the same functionality.

 

 

Steve Hall
stephen.hall@parker.com
0 Kudos
Message 1 of 4
(3,881 Views)
I presume you've done this already, however just in case...

As a temporary work around until something gets sorted out with your problem, you could use the DB Tools Execute Query VI and just do it the 'hard' way with SQL commands.
0 Kudos
Message 2 of 4
(3,872 Views)
Yes, in the past I've used the SQL commands.  The new function to read a table looks good so I tried it.  I did fine the Variant To Data.vi  works in my case.
 
 
Steve Hall
stephen.hall@parker.com
0 Kudos
Message 3 of 4
(3,870 Views)

thank you

 

 

saltake.. for one hour im confusing in database toolkit to read all the data in the db. its was coming only in variant format.. how searching to convert variant to data. Your vi's help me to finish my program thank you.........Smiley Wink

Regards,
N. Srinivasan
0 Kudos
Message 4 of 4
(3,485 Views)