I am trying to call Oracle stored procedure using Microsoft.Practices.EnterpriseLibrary 6 in C#
Below is my stored procedure
create or replace
PROCEDURE "US_GET" (inputa IN integer,
cur_OUT IN OUT SYS_REFCURSOR)
IS
cur_N SYS_REFCURSOR;
BEGIN
OPEN cur_N FOR
SELECT columnb FROM tablea
WHERE columna = inputa;
cur_OUT := cur_N;
end US_GET;
Code below is used for calling this procedure
DatabaseProviderFactory factory = new DatabaseProviderFactory();
Database db = factory.Create(DataBaseInstance);
DbCommand dbCommand = db.GetStoredProcCommand("US_GET");
db.AddInParameter(dbCommand, "inputa", DbType.Int32, 0);
Dataset ds = db.ExecuteDataSet(dbCommand);
I am getting below error on runtime
Oracle.DataAccess.Client.OracleException: ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'US_GET'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Has anyone came across this error ?? Is there any fix available for it?? I tried different ways of implementing this, but couldn't arrive at the solution