I want to pass the data to the Stored Procedure via Parameter from studio using execute query .But the declaration of the parameter in the Stored Procedure is in XML data type .
Declare @Id XML = NULL
Declare @Name XML = NULL
Here how can i pass the parameter id from the studio .
In which data type i have to create a variable and pass it as a parameter in Studio.
Thanks in Advance ,
Welcome to UiPath Community!
Please refer to the threads below.
Use Execute Query Activity,
Mention the Stored Procedure name
I’m trying to execute a procedure with parameters but it is returning me this error
We are trying to migrate all our codes from AA to UI Path. I’m having a hard time running a stored proc.
Procedure name: usp_GetPreviousBusinessDate with parameters (‘ON’,‘$Date$’)
Can you please advise me how to use activity Execute Query activity in this case or is this the right one?
Thank you in advance
Hello, So I find my way to this, and Yes if the parameter is set to Out, you can Declare your parameter in your StoredProcedure with the attribute “out” and it will be available in UIPath :
CREATE PROCEDURE [dbo].[MY_STOREPROC]
@myOutPut int out
SET @myOutPut = 2
Then in UiPath you can call the storedProcedure with :
parameter : myOutPut
direction : out
value : myVar
@pravin_calvin yes praveen ,i have done all the configuration properly . when i execute the query with out passing any parameter , the query executes successfully and fetches all the data from SP .
use below format to pass values to storeprocedure
"EXEC procedureName @id='"+id.Tostring()+"',@Name='"+Name.ToString()+"'"
You have to give the parameter name in
the direction of the parameter is a type of I/O
Type of the parameter in the Type column
passing a value to the parameter
You can search for the xml type browser for type and pass the parameters
yeah i tried this way , in the execute query i have changed the CommandType as Stored Procedure , and passed the SP name in sql. and in the parameters i have to pass the data now.
Kindly refer the image
Pass in the Sql commend, connection
@Palaniyappan yes bro , i gave all the values , but im struck with passing the data in XML format .
yes tried , but getting only the column names in the output , no data .
@Paari_Ravi what query you have given and any error ?
pls share the screenshot
@arivu96 please find the attached image
Where did u passes parameters to store procedures
If you see in the property panel there is an option Input and sub option Parameters where i pass the parameters.
you have passed correctly check from the database may be for that input no records available in the database.
The data is available for that input in the DB. When i execute a query in SQL manager with parameters im getting the data.
IN Studio , when i tried to execute the query without any parameters im getting the whole data but i wonder why im not getting the data when i execute the data with parameters from studio .