LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Converting data from MySQL database to usable values

Solved!
Go to solution

Hi,

After connecting to the database and retriving data out of it. How do i do something to it ? Like for example i wanna do an addition with the values obtain from database.
pic 2.jpg

pic 1.jpg

0 Kudos
Message 1 of 13
(3,505 Views)
-Try Database Variant To Data Function http://zone.ni.com/reference/en-XX/help/370016E-01/lvdatabase/database_variant_to_data/
-After converting to Labview data of type 2D array you can do all operations on it.
Thanks
uday
Message 2 of 13
(3,492 Views)

Hi Uday,

I tried doing this, not sure why it didn't work.

Question.jpg

0 Kudos
Message 3 of 13
(3,445 Views)
To the "type" terminal connect 2D array of constant of numeric
Thanks
uday
0 Kudos
Message 4 of 13
(3,442 Views)
Hi,
Just to check u 2d array of numeric is 2d number array right ?
Thanks
0 Kudos
Message 5 of 13
(3,437 Views)
Solution
Accepted by topic author S.Neo

If the data is of string need to provide 2D String Array as reference to the Variant.

 

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 6 of 13
(3,435 Views)

Yes i meant 2D number of array.
-I double checked actually palani, before posting whether i should say of strings or numbers then i saw addition in OP first post and hence i didn't touch strings.

 

Edit: If you need help : http://www.ni.com/white-paper/7571/en/

Thanks
uday
Message 7 of 13
(3,430 Views)

Thanks uday,

As the variant value seems to be String i just wanted to make sure if its string better to use string array as reference.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
Message 8 of 13
(3,422 Views)

Hi,

 

Even though I have solved the problem but I still have a few question which i don't understand. Hope u could help me. 

1) Why is it a 2x2 array ?

2) How do i take a selected value for example. i only want to the value 3333 to be taken out from database. 

3) How do i add the 3rd (3333) number and 4th (4444) number from database after getting the value out from array?

4) I am a beginner in labview and all other programming. Is there any way to learn ?

 

Thank you.

 

1.jpg2.jpg

0 Kudos
Message 9 of 13
(3,372 Views)

@S.Neo wrote:

Hi,

 

Even though I have solved the problem but I still have a few question which I don't understand. Hope you could help me. 

1) Why is it a 2x2 array ?  You could be asking for multiple columns and multiple records.  The functions need to handle that possibility

2) How do i take a selected value for example. i only want to the value 3333 to be taken out from database.   Index Array function

3) How do i add the 3rd (3333) number and 4th (4444) number from database after getting the value out from array?  Add

4) I am a beginner in labview and all other programming. Is there any way to learn ?

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

 

Thank you.

 

 


 

Message 10 of 13
(3,350 Views)