Passing data to the Stored Procedure via Parameter using execute query

Hi ,

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 .

Sample :
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 ,
Paari

Hi @Paari_Ravi

Welcome to UiPath Community!

Please refer to the threads below.

Regards

@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 .

Hi @Paari_Ravi ,
use below format to pass values to storeprocedure
"EXEC procedureName @id='"+id.Tostring()+"',@Name='"+Name.ToString()+"'"

Regards,
Arivu

1 Like

Hi

You have to give the parameter name in Name column
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

Cheers @Paari_Ravi

1 Like

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

image

Pass in the Sql commend, connection

Regards,
Arivu

@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

Regards,
Arivu

@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.

Regards,
Arivu

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 .