LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Write to database

Hello.

 

i have this vi and i want to write in a MySql database.

citire.png

It works to write in XAMPP database but i want to write only a value every time the program runs. Everytime i start the vi overwrite the previous value in the database.

 

To be clear: let's say first run i write: A 3, next run i write B 4.

i want both values to be stored in the database not only the last one.

 

Thank you.

0 Kudos
Message 1 of 3
(2,302 Views)

Are you sure it is overwriting the previous value?  Your SQL statement only says to insert ("A", "3").  There is nothing about ("B", "4") in your code.  Also, if one of your dB columns only allows unique values, when you try to insert the same value again, the transaction will fail.  Do you get any errors?

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 2 of 3
(2,289 Views)

Now i can do this. The boolean value from function "Create data base" must be false. it's a overwrite option.

 

Thank you.

0 Kudos
Message 3 of 3
(2,249 Views)