LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Record string indicator to mysql database

Hi experts, i have 3 string indicator and i want to record the data to mysql database. i already have a table with 3 column. how can i do that?

 

Thank you

0 Kudos
Message 1 of 8
(1,164 Views)

when i put the button inside a cluster, it won't work. i use the button to call a sub vi so i want the button keep working when its inside a cluster

0 Kudos
Message 2 of 8
(1,162 Views)

Hello Ijan,

 

Thank you for bringing this issue to the forums. I need a little more information, what are you exactly trying to do. Are you trying to add strings to a table with 3 columns? So, the user types a string into a control and that gets put into the database upon the user pressing a button?

 

Also, looking at your test.vi, the DB Tools Insert Data.vi is outside the while loop, hence, it will only execute once. Maybe try and move this inside the while loop.

 

When in LabVIEW I suggest you take a look at a few examples.

Go to Help>> Find Examples..

Then search, "Database."

Look at the "Database Insert.vi", "Database Fetching.vi", "Create Database Table.vi" and "Database Connection.vi"

 

Thank you,

Vimal Fernandez

Applications Engineer
National Instruments
0 Kudos
Message 3 of 8
(1,151 Views)

There are several problems with your VI, but the database write can be fixed by adding the string to a cluster and then turning it into a varient with "To Variant".  If you're only writing to a single column of the table you'll need to specify the column name on the insert VI.  It's probably best practice to always specify the column names, even when you write to every column in the tabel.

 

Since the database write is seperate from the while loop the write will execute in parallel with your loop.  This means that you probably aren't trying to write the value you think you are.

 

I made a few improvements for you to look at.  You'll need to change the columnnames to make them match your table.  If your table doesn't allow null values then initializing the shift registers with blank strings might not work either.

0 Kudos
Message 4 of 8
(1,148 Views)
thanks to all. I'm very new to programming and labview so thats why i must learn a lot to all of experts here. Onve more thank you very much for all of your help. Regards
0 Kudos
Message 5 of 8
(1,138 Views)

Hi wart..i use labview 2009, can you please convert the fle so i can open and learn it.

 

thank you

0 Kudos
Message 6 of 8
(1,135 Views)

attached is my vi. since i'm really new to programming and labview, can please somebody advise me about my vi. I will use this vi to record minutes of meeting to a mysql database. the dalog_resp.vi is used to fill the responsible string.

 

I need to display all mysql data into a table and i need to short the data based on project, meeting date, status and responsbile (i'm thinking to use combo box). e.q if i  choose "SAM" from responsible combo box, i want the table only show the data contain SAM value. And i have another problem...when i put the boolean button into a cluster, it won't call the dialog_resp.vi

 

Please advice me...

 

Thank you

 

Regards

Ijan

Download All
0 Kudos
Message 7 of 8
(1,133 Views)

moved

 

Apparenly the poster has no patience to wait for a response

0 Kudos
Message 8 of 8
(1,100 Views)