Executenonquery is returning error 'No size set for variable length data type: String' while executing Oracle Stored Procedure

I am trying to execute an Oracle stored procedure which has 2 input parameters and 1 output parameter. I am getting below error when I ran the project. I could execute the project successfully when the oracle procedure doesn’t has any output parameter. How to set the size of oracle output parameter?

Execute Procedure Proj has thrown an exception

Source: Execute non query

Message: Parameter ‘O_MESSAGE’: No size set for variable length data type: String.

Exception Type: Exception

System.Exception: Parameter ‘O_MESSAGE’: No size set for variable length data type: String.

Server stack trace: _
_ at System.Data.OracleClient.OracleParameterBinding.PrepareForBind(OracleConnection connection, Int32& offset)

_ at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)_
_ at System.Data.OracleClient.OracleCommand.ExecuteNonQueryInternal(Boolean needRowid, OciRowidDescriptor& rowidDescriptor)_
_ at System.Data.OracleClient.OracleCommand.ExecuteNonQuery()_
_ at UiPath.Database.DatabaseConnection.Execute(String sql, Dictionary`2 parameters, CommandType commandType)_
_ at UiPath.Database.Activities.ExecuteNonQuery.<>c__DisplayClass34_0.b__0()_
_ at System.Runtime.Remoting.Messaging.StackBuilderSink.PrivateProcessMessage(IntPtr md, Object[] args, Object server, Object[]& outArgs)
_ at System.Runtime.Remoting.Messaging.StackBuilderSink.AsyncProcessMessage(IMessage msg, IMessageSink replySink)_

Exception rethrown at [0]: _
_ at UiPath.Database.Activities.ExecuteNonQuery.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)

_ at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)_
_ at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)_

1 Like

Hello! I might have the same problem Here.

I used to call the procedures by the CommandType “Text” on the Activity “Execute non query”, this way:

“Begin FL.PROCNAME(‘Param1’, 'Param2); End;”
Here I didn’t used to pass Parameters to the Activity. I used variables to build the String. Everything was working fine.

Happens that the Procedure changed and now I have an OUTPUT parameter.
I tried to change the same Activity property CommandType to “StoredProcedure” and then changed the Sql parameter to the name of the Procedure. I created the input parameters with the same name as the procedure and indicated the Direction OUT on the last one. I’m getting this message now:

String[6]: the Size property has an invalid size of 0

Does anyone knows if I’m doing something wrong or if this is a known problem? On the procedure all parameters are VARCHAR and I’m sending them as String.

Thanks in advance!

1 Like

Looks like there is an issue with UiPath in executing the Oracle Stored Procedure. I tried all possible ways to set the size of out param but nothing worked.

Thanks for your answer! I’ll try something else, maybe Invoke Code with VB. How did you worked it out?

Have you solved the issue?

1 Like