How to update sql table by passing value through variable

Hi all, Am reading data from Sql datatable and iterating for processing some action,In this i have assigned 1st column to variable and taking 2nd column value to perform action after completing the actions i have to update row status of sql datatable to completed status based on 1st column value but code is not giving any error but data is not updating in table.

This is my query: “Update midx_table set Winesp_Status=‘completed’ where ID=@cono”
cono is assigned variable name

please can anyone help me out in this.

use this same statement with value passed instead of variable @cono and execute that in your database server.
lets check whether it is updating there when tried manually

Cheers @DivyaT

Yeah I have checked its updtating

1 Like

Then it should work from uipath as well
–use EXECUTE NON-QUERY activity and mention the sql statement


make sure the connection is made and we can check that with connection wizard where we got an option to check whether the connection is made ornot with TEST CONNECTIVITY option

kindly try this and let know for any queries or clarification
Cheers @DivyaT

Its not relevant to my question am trying to pass value through variable am unable to update anything in sql datatable

hmm…

see if you were able to update that manually you must be able to do the same in uipath as well
–there must be only two reasons for this
either there is no connectivity between uipath and your database server
or
the query you have passed is not correct

–as you said the query is working perfectly fine, the only possiblility is with the connection
thats what we need to check

hope now it relates to your question
kindly let know for any queries or clarification

@DivyaT

In sql script query is running but I dont know the syntax for writing in uipath because am not getting expected output and even any error on above syntax

Please anyone update on my question.
This is my query “UPDATE midx_table
SET WINESP_STATUS= ‘Completed’
WHERE ID=@c” am supplying value through argument but its not update anything in database