When i try to access and excute a store procedure through following C# code Here is my C# code
OracleParameter op = null;
OracleDataReader dr = null;
OracleCommand cmd = new OracleCommand();
cmd.CommandText = "pkg_prov_index.getNextPanel";
cmd.CommandType = CommandType.StoredProcedure;
op = new OracleParameter("pCurrentPanelId", OracleDbType.Int32);
op.Direction = ParameterDirection.Input;
op.Value = masterProviderIndex.CurrentPanelId;
cmd.Parameters.Add(op);
op = new OracleParameter("pRefCursor", OracleDbType.RefCursor);
op.Direction = ParameterDirection.inputOutput;
cmd.Parameters.Add(op);
dr =cmd.ExecuteReader(); Here , it gives me an error that says ORA-06550: line 1, column 37: PLS-00201: identifier 'XYZ' must be declared at
if(dr.HasRows)
{while(dr.Read())
{
}
}
I do have the permissions to access and execute the stored procedure so no issues with that. And when I opened and saw the Stored Procedure in Sql Developer it has an input and output cursor(input cursor is there for reading so many columns as SP is just nothing but a select statement along with a where clause on a View which is written involving 5 tables together and then output cursor is for writing the output result of that SP).Thats what my understanding of cursor is ..since I'm a .Net guy not an oracle expert.Now coming back to the most important point. If you guys look in to my code for input/output cursor all I get is oracledbtype.refcursor in C# enumeration for oracledbtype but the oracle SP is using an input/ouput cursor, is this the root of my error, because I'm sending an input/output parameter as refcursor whereas oracle SP has input/output cursor not a refcursor, but refcursor is all I get when writing code using C#. Your help will be much appreciated. Thanks.