This is a migrated thread and some comments may be shown as answers.

Oracle - SQL Data Source. Wrong number of types of arguments in call to

1 Answer 636 Views
Report Designer (standalone)
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
Mohamed asked on 20 Dec 2018, 03:18 PM

 I have a very simple procedure :

create or replace 
procedure         get_name(
                 p_cursor out sys_refcursor) is
  open p_cursor for
  select NAME 
  from table1;


Using SQL Developer the stored procedure returns a list of names, however when trying to use the Telerik Report Designer i receive an (see below for stack trace) error when trying to execute the stored procedure. The only parameter i have is an OUT parameter.

Any reasons as to why this does not work? Is this a known issue?

I am using the Oracle.ManagedDataAccess.Client provider.

System.Data.OracleClient.OracleException (0x80131938): ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'get_name'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored

   at System.Data.OracleClient.OracleConnection.CheckError(OciErrorHandle errorHandle, Int32 rc)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, Boolean needRowid, OciRowidDescriptor& rowidDescriptor, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.Execute(OciStatementHandle statementHandle, CommandBehavior behavior, ArrayList& resultParameterOrdinals)
   at System.Data.OracleClient.OracleCommand.ExecuteReader(CommandBehavior behavior)
   at System.Data.OracleClient.OracleCommand.ExecuteDbDataReader(CommandBehavior behavior)
   at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior)
   at Telerik.Reporting.Processing.Data.SqlSchemaAdapter.<GetFields>d__1.MoveNext()
   at Telerik.Reporting.Processing.Data.SimpleSchemaAdapter.Fill(SimpleDataModel model)
   at Telerik.Reporting.Processing.Data.SimpleDataProvider`1.GetSchemaCore()
   at Telerik.Reporting.Processing.Data.DataProvider`1.Telerik.Reporting.Processing.Data.IDataProvider.GetSchema()
   at Telerik.Reporting.Data.Design.DataSourceDesignerBase.Telerik.Reporting.Design.Interfaces.IDataSchemaProvider.GetSchema()
   at Telerik.Reporting.Data.Design.DataSourceService.GetSchemaFromContext(Object context)
   at Telerik.Reporting.Design.DataExplorerControl.<>c__DisplayClass2.<RefreshDataSource>b__0()


1 Answer, 1 is accepted

Sort by
Ivan Hristov
Telerik team
answered on 28 Dec 2018, 10:47 AM
Hello Mohamed,

Fetching data from a procedure that uses SYS_REFCURSOR works when using Oracle ODP.NET provider. From the provided stack trace I notices that the assembly that provides connection to Oracle is the deprecated System.Data.OracleClient, which should not be used, because its types will be removed in a future version of .NET framework (source: You can read more here: Should I use System.Data.OracleClient .NET data provider to retrieve data for reports from an Oracle database?

My suggestion is to install ODP.NET and use it to connect to the Oracle database. In this case the stored procedure should return the result as expected.

Ivan Hristov
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Report Designer (standalone)
Asked by
Top achievements
Rank 1
Answers by
Ivan Hristov
Telerik team
Share this question