Update in database


#1

Hello guys i am new and fresher in uipath can u pls help me in updating a data records in database using database i have written stored procedure can u pls help me guys


#2

Hi,

If your store procedure updating some records in database you have to use the activity Execute non query. For this one you have to change in the properties panel the commandType to : StoreProcedure, the input for this activity will be: the name of your store procedure that you would like to execute and the parameters that this store procedure received (declare this in the Collection field that you find in the properties panel).
Please take care that the names of the parameters that this store procedure received to have the same names).

Thanks!
Ninett


#3

@Ninett_Panfir, Does the connection we open here closes automatically or Should we need to use Disconnect activity after execute non-query ?

Regards,
Dom :slight_smile:


#4

@Ninett_Panfir thanks brother if u have a demo can u pls share for the reference
Thanks


#5

You have to use the disconnect activity at the end.


#6

@Ninett_Panfir, thanks for the clarification. :slight_smile:

Regards,
Dom :slight_smile:


#7

I don’t have any demo, but please let me know if something is not working properly. What I have is related with the tables that I have in my database so is not related with what you want. :slight_smile:


#8

Thanks bro i will go home and try it and come back to u
Thanks & regards
Arjun


#9

HI @Ninett_Panfir can u help me with this

thanks & regards
arjun


#10

Hi,

Can you send me the syntax that you are sending to update the table please?

Thanks,
Ninett


#11

hi @Ninett_Panfir
i am sending u the screen ss of my flow pls

this are the screen shots
pls help
thanks & regards
Arjun Parashar


#12

Hi @arjun27 ,
I have tested your situation to my side . I identified that have to change the command type is to “storedprocedure”. If i set it as “Text”, Yes I am getting error what you have specified in the above.

Below i have attached the screen and my sample files also.

In the sample file , It has Execute query and Execute Non Query (Both)

File : Update Database.zip (2.6 KB)

Regards
Balamurugan.S


Execute Non Query not inserting/updating all values
#13

Hi,

You have to change the property to CommadType to “StoreProcedure” and I am sure that it will work. And please use the activity Execute Non Query, because what your store procedure returns is just the number of the rows that has been affected (number of rows updated).

Thanks,
Ninett


#14

Thanks @Ninett_Panfir for the help
I did it
Help me more pls i have doubts
Thanks & Regards
Arjun


#15

hi,

If it works, what doubt do you have?

Thanks,
Ninett


#16

Hi @arjun27

Before using the execute non query have you given the Connect Activity and use Execute Non Query Activity

Thanks
Ashwin S


#17

Hi @Ninett_Panfir i am back with few doubt
I am using if else activity for finding a leap year
Logic i put is year mod 4 = 0
And after when i run it i put wrong input but then also it is showing me true message box
What i can do in this
Pls help
Thanks & Regards
arjun


#18

Mod.xaml (6.1 KB)
@arjun27


#19

Thanks buddy


#20

Hey @sreekanth and @Ninett_Panfir am making a work flow in which i have to select a option from the drop down list i thought of using select item activity but its says control does not select item
pls find the attachment and n help me friends how can i solve it arjun11arjun12
thanks guys
arjun