LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

labveiw with Mysql

Solved!
Go to solution

Hi 

I am using labview to read and write data with Mysql, i created some columns in Mysql table then i made the code in labview to query the table,problem is why i can not have the column at the front panel? Is the column should manualy type in at the front panel?

Some can give some advices thanks.

0 Kudos
Message 1 of 8
(3,289 Views)
Solution
Accepted by topic author 314159ym

Any database will only return the data except if you explicitly request it. So I suggest you to use build array in the Array tool-set and add the title that you already have in a 1D array as a constant.

Benoit

0 Kudos
Message 2 of 8
(3,262 Views)

@bseguin wrote:

Any database will only return the data except if you explicitly request it. So I suggest you to use build array in the Array tool-set and add the title that you already have in a 1D array as a constant.

Benoit


This won't always be possible especially if you are calling stored procedures or you are executing queries like "SELECT * FROM table".  This is where the recordset is useful.  In this snippet, I am executing a stored procedure, fetching the recordset data and grabbing the column names and datatype from the recordset.  Fetching the datatype will help with formatting the data later. 

2018-12-13_16-29-07.png

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 3 of 8
(3,230 Views)

Hi 

Could you please send me this VI,then i can study

 

Thanks

0 Kudos
Message 4 of 8
(3,223 Views)

I won’t be able to post anything until Monday. But all of the VI shown are in the database toolkit. The first one is Create Parameterized Query.  This one is a bit complicated but can be removed if you are executing a simple select statement.  Just duplicate the code shown and wire up an SQL statement to the Execute Query VI. The other VI is Get Recordset Properties. 

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 5 of 8
(3,217 Views)

Hi 

No problen i will wait,it is a fast way to learn if have some examples,meanwhile i will study the database toolkit

Thanks

0 Kudos
Message 6 of 8
(3,214 Views)

See attached.

aputman
------------------
Heads up! NI has moved LabVIEW to a mandatory SaaS subscription policy, along with a big price increase. Make your voice heard.
0 Kudos
Message 7 of 8
(3,179 Views)

Thanks

0 Kudos
Message 8 of 8
(3,165 Views)