LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

database variant to data is not compatible

Hello!
 
I'm using databse toolkit to import data from a MySqL database.....I'm using the DB tool select data to specify the column I want (in this case a column of double).....then I wire a variant and then a database variant to data. In type input I wire a numeric constant (double).
When I run the aplication it makes the following error:  error 91...database variant to data is not compatible with the data type wired in the type input.
 
I want to know why it appears this error and which is the best way to import data (numeric data (double)) from a MySql database to Labview.
 
Thanks!!!!
 
Larson
0 Kudos
Message 1 of 5
(3,136 Views)

Hi,

did you try other formats ?

It would be nice if you take the time to rate this answer
http://www.machinevision.ch
0 Kudos
Message 2 of 5
(3,127 Views)

Yes I've tried with string.....but it occurs the same error.....I don't if it needs some other block with the blocks i've explained before.

Dou you have some .vi example about importing data from databse? It would be perfect. I've found in database toolkit examples but, it doesn't help me....because any example use select data block.

 

Thanks

 

Larson

0 Kudos
Message 3 of 5
(3,123 Views)
Hello again.....
 
But i need to import numeric data (double  type) for this reason I'm interested om this kind of data.
 
Thanks
0 Kudos
Message 4 of 5
(3,113 Views)
Larson,

I was able to succeed with something like the attached image.  I am using the MySQL 3.51 ODBC driver with MySQL server 4.1.

Note that for large columns, the imaged solution is slow.  It may be faster to drag in the entire table (painful on memory, I know) using DB Tools Fetch Table Data.vi and convert from using the LabVIEW functions.  Of course, DB Tools Fetch Table Data.vi doesn't gracefully handle nulls, and has a few behavioral quirks as well... YMMV.

Joe Z.
0 Kudos
Message 5 of 5
(3,104 Views)