Problem with stored Procedure Example from Documentation

Problem with stored Procedure Example from Documentation

Postby Dunkelmann » Wed 12 Apr 2017 15:44

Hello,

I have problems getting this example from your Documentaion to work:
(Database Oracle 12c, Visual Studio 2015 CS,Latest dotConnectUniversal Professional Version, downloaded yesterday)

The Package EMPPKG with the stored Procedure SELECTEMP is created and working.

Code Example from your Documentation:

ConnStr = "provider=Oracle;User Id=scott;Password=tiger;Server=w7pdb;Unicode=True;Direct=True;Service Name=pdb_development;Persist Security Info=True;";

UniConnection connection = new UniConnection(ConnStr);
connection.Open();
UniCommand cmd = connection.CreateCommand();
connection.Open();
cmd.CommandText = "EMPPKG.SELECTEMP";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.Add(new UniParameter("DEPTNO", UniDbType.Int));
cmd.Parameters.Add(new UniParameter("CUR", UniDbType.Cursor));
cmd.Parameters["DEPTNO"].Value = 10;
cmd.Parameters["CUR"].Direction = ParameterDirection.Output;
cmd.ExecuteNonQuery();
UniCursor uniCursor = (UniCursor)cmd.Parameters["Cur"].Value;
uniDataAdapter1.Fill(dsTest, "EmpCursor", uniCursor);


//the last line throws exception:

uniDataAdapter1.Fill(dsTest, "EmpCursor", uniCursor);


ORA-01009: missing mandatory parameter


I have tried many things, but had no success..

Can you provide working C# Example for use with Ref Cursor Output Param ?

Thanks!
Marcus
Dunkelmann
 
Posts: 13
Joined: Fri 05 Apr 2013 08:43

Re: Problem with stored Procedure Example from Documentation

Postby Pinturiccio » Thu 13 Apr 2017 12:45

We have reproduced the issue. We will investigate it and post here about the results as soon as possible.
Pinturiccio
Devart Team
 
Posts: 2020
Joined: Wed 02 Nov 2011 09:44

Re: Problem with stored Procedure Example from Documentation

Postby Dunkelmann » Thu 13 Apr 2017 15:18

Thanks, I will wait....

MV
Dunkelmann
 
Posts: 13
Joined: Fri 05 Apr 2013 08:43


Return to dotConnect Universal