From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

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,276 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,249 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,217 Views)

Hi 

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

 

Thanks

0 Kudos
Message 4 of 8
(3,210 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,204 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,201 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,166 Views)

Thanks

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