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
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).
@Ninett_Panfir, Does the connection we open here closes automatically or Should we need to use Disconnect activity after execute non-query ?
You have to use the disconnect activity at the end.
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.
Thanks bro i will go home and try it and come back to u
Thanks & regards
Can you send me the syntax that you are sending to update the table please?
i am sending u the screen ss of my flow pls
this are the screen shots
thanks & regards
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)
Execute Non Query not inserting/updating all values
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_Panfir for the help
I did it
Help me more pls i have doubts
Thanks & Regards
If it works, what doubt do you have?
Before using the execute non query have you given the Connect Activity and use Execute Non Query Activity
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
Thanks & Regards