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

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

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, the DB Tools Insert 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", "Database", "Create Database" and "Database"


Thank you,

Vimal Fernandez

Applications Engineer
National Instruments
0 Kudos
Message 3 of 8

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
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

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

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 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


Please advice me...


Thank you




Download All
0 Kudos
Message 7 of 8



Apparenly the poster has no patience to wait for a response

0 Kudos
Message 8 of 8