Issue in Calling Stored procedure from Execute Query activity

Hi,
I’m connecting and working with HSQLDB with uipath everything works fine connection made and can call function and tables from uipath but Currently im facing issue while calling procedure from uipath but the same procedure can be called manually from the HSQL DB. “Pr_test” is my procedure name and im passing current date in the parameter. The procedure executed fine when callled from the HSQLDB server but i dont know what the issue here is

The error message is "Execute Query: ERROR [42581] ERROR: unexpected token: PR_TEST;
Error while executing the query

I dont know what this error is please help.

call pr_test(DATE’2021-07-16’); This is how i call from HSQL server it worked fine

Thanks in advance

Hi @MLT

Were we able to successfully configure the connection with database and its server
did we click on test connectivity option in EXECUTE QUERY → Configure Connection

and also check whether that procedure is having any IN arguments and if so it has to be passed with PARAMETERS

Cheers

@Palaniyappan thanks for your reply…

And yes I have made the connection and the test connection was successful and also I have given the input parameter in the in argument "Base date " is the in argument.it works fine in the server but I don’t know what is missing here

Connection successful

1 Like

Perfect
It ey mentioning the dB name along the stores procedure name like in case if we are passing DB name in Connection string then we can directly execute [dbo].[storedprocedurename] else [DBName].[dbo].[storedprocedurename]

Pls let know if this works or for any clarification

Cheers @MLT

hi @Palaniyappan i tried ur above suggestion but same error. and also while calling procedures from odbc the below code is the actual syntax

The correct statement to execute a stored procedure via ODBC is as follows:

OdbcCommand ODBCCommand = new OdbcCommand("{call getDetailsFromEmail (?)}", ODBCConnection);
ODBCCommand.CommandType = CommandType.StoredProcedure;
ODBCCommand.Parameters.AddWithValue("@KundenEmail", KundenEmail);

This is what i tried in HSQL server it worked fine but when i tried the same thing using Execute non query it throws error in the parameter..
![error|690x223](upload://yvxD3jdaYloMTXLEzQx2mnO4Jda.png)

The error is "Execute Non Query: ERROR [42581] ERROR: unexpected token: DATE'2021-07-18' required: );
Error while executing the query"
But the Input param value i need to pass is DATE'2021-07-18' i tried it but seems like error in the param

1 Like

Five
Try mentioning like this in Value
“Date””’2021-07-16’”””

That is we are covering the single quotes with two double quotes on either side like this

“Date” ” ’2021-07-16’ ” ” ”

So that the value goes with that single quotes as expected

Cheers @MLT

Thanks @Palaniyappan but no luck same error throws
Execute Non Query: ERROR [42581] ERROR: unexpected token: DATE ‘2021-07-16’ required: );
Error while executing the query

Can I see like how it was mentioned
May be a screenshot if possible
@MLT

“DATE”+"‘2021-07-16’ "

No buddy
Without concatenating

Just we need to surround the single quotes with two double quotes
@MLT

Thanks @Palaniyappan tried it “Date”“‘2021-07-16’”“” and also need to cover the date with single quote alone but its not working.
ps

hmmm I m wondering where we are missing
fine then

lets try with EXECUTE QUERY ACTIIVTY and instead of storedprocedure use TEXT and in SQL property mention the same complete statement which you were using in sql server to call the procedure

@MLT

Tried every combination, with every “Command type”, for a single, parameter-less, Oracle stored procedure call, and couldn’t make it work.