LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit a particular element in a data base table

Solved!
Go to solution

 

 

Hi I use database toolkits .I created  tadle as shown below with DB Tools Insert data vi.

 

 

 

a

a
Name Marks
kav 88
ani 56
ayy 90
sug 89
jey 97
 

I want to edit the name ayy and the mark corresponding to the name .can anyone give me a solution for this

kavi
0 Kudos
Message 1 of 52
(3,287 Views)
May be you have to use update command with a criteria to update the name.
Message Edited by Ranji on 06-25-2009 02:11 AM
0 Kudos
Message 2 of 52
(3,272 Views)

Hi karpaga,

you should use the update command.

Mike

Message Edited by MikeS81 on 06-25-2009 09:13 AM
0 Kudos
Message 3 of 52
(3,269 Views)

Thanku all

 

i will try and come back to u

 

kavi
0 Kudos
Message 4 of 52
(3,265 Views)
I couldn't find a update vi in db tools
kavi
0 Kudos
Message 5 of 52
(3,264 Views)

Hi kavi,

use the "DB Tools Execute Query" function with this SQL query:

 

UPDATE <tablename> SET name="new" WHERE ID=50

 

You have to close the recordset refnum with the "DB Tools Free object" function.

 

Mike

Message Edited by MikeS81 on 06-25-2009 09:41 AM
0 Kudos
Message 6 of 52
(3,256 Views)

Hi kavi,

in your case the Update command should be like this:

 

UPDATE a SET Name="kavi",Marks=101 WHERE Name="ayy"

 

 

Mike

0 Kudos
Message 7 of 52
(3,247 Views)

Hi Mike,

 

-2147217904

NI_Database_API.lvlib:Conn Execute.vi->Example to Update PhoneNumber Labview MDB (8.6).vi<ERR>.  Invalid string: specified field does not exist or contains an unsupported character

 

I attached the program and the access i used.

 

 

kavi
0 Kudos
Message 8 of 52
(3,241 Views)

HI mike,

 

Im waiting for ur reply

kavi
0 Kudos
Message 9 of 52
(3,236 Views)

Hi kavi,

the Marks value has to be in quotation marks, because it's also a text.

See the attached example.

 

Mike

0 Kudos
Message 10 of 52
(3,217 Views)