LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do update mySQL table's data with LabView database tookit ?

Dear all ,

How do update mySQL table's data with LabView database tookit ?

thanks .

0 Kudos
Message 1 of 7
(7,019 Views)

"ase" <x@no.email> wrote in message
news:1222018814602-780413@exchange.ni.com...
> Dear all ,How do update mySQL table's data with LabView database tookit
?thanks .

Use an UPDATE statement.


0 Kudos
Message 2 of 7
(6,996 Views)

Hi Wiebe@CAR…

yes ,you're right .

Use update statement.but I don't know how to carry out it with labview .

could you give a example ?

thank you inadvance .

0 Kudos
Message 3 of 7
(6,985 Views)
I don't have the toolkit installed, but there should be examples shipped
with it.

If you know how to send an INSERT statement, just replace it with an UPDATE
statement.

Regards,

Wiebe.


0 Kudos
Message 4 of 7
(6,972 Views)
This is the functino I use to update.  You need to open a connection with the open connection function. Reference it with the name of a driver you create in ODBC sources found in control panel/administrative tools.  Pass in the table you want to update.  Then an array of columns you want to update and what value you want to be in that column.  In the condition you must specify what entry to update (example:  WHERE [Money] = '6')  This would update the value of the specified column where the money column equals six.  Checkout the microsoft developers network for more about SQL conditional statements. Be sure to close the connection with the close connection function when you've finshed your statement.  Good luck
Message 5 of 7
(6,966 Views)

Hi

just stumbled over a vi in the toolkit lvlib.

There is an "DB Tools Update Data.vi" that works more or less like the Insert vi. It is not part of the DB menue, so you'll have to select it with the general "Select a vi...".
Like the Insert it has the advantage of handling clusters as a variant.

Good luck, Gabi

7.1 -- 2013
CLA
Message 6 of 7
(6,625 Views)

I generally build a statement through normal string concatenation and do a Execute SQL Query.

(Ofc you first need to open database, and afterwards free the query and close the database (atleast when you leave the program))

 

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 7
(6,610 Views)