LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

"Variant To Data" fails to convert a variant to I32.

Solved!
Go to solution

@Andrey Dmitriev wrote:

@iCat wrote:

 

The value is 25, but if the VI converts it to I32, the returned value is 0.

 


Try to use Database Variant To Data instead of Variant To Data:

 

db.png


DB variant To Data doesn't change the result as far as I tested.

 

But I'll have to give it another try next monday.

0 Kudos
Message 11 of 14
(502 Views)

@Norbert_B wrote:

Can you look into MAX and find out which version of the Database Connectivity Toolkit you have?


What is MAX?

0 Kudos
Message 12 of 14
(496 Views)

iCat wrote:


Since I'm a LabVIEW beginner, I don't know what that even means.



Oh, sorry I hadn't realized... I was just suggesting you could intergrate this snippet in your code in order to check that the type of data contained in your variant is an I32 or something else.

Is it you who made that code you posted or have you inherited it from someone else?

 

MAX is "Measurment & Automation Explorer" an exe that you can use to check your NI Hardware and NI Drivers.


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 13 of 14
(491 Views)

@Andrey Dmitriev wrote:

@iCat wrote:

 

The value is 25, but if the VI converts it to I32, the returned value is 0.

 


Try to use Database Variant To Data instead of Variant To Data:

 

db.png


I tried DB Variant To Data, and my VI now converts null variants to 0.

Before using it, null variants were the cause of errors.

 

It's marked as solved.

0 Kudos
Message 14 of 14
(472 Views)