Problem with stored Procedure Example from Documentation

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for universal data access
Post Reply
Dunkelmann
Posts: 13
Joined: Fri 05 Apr 2013 08:43

Problem with stored Procedure Example from Documentation

Post by 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

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Problem with stored Procedure Example from Documentation

Post by 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.

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

Re: Problem with stored Procedure Example from Documentation

Post by Dunkelmann » Thu 13 Apr 2017 15:18

Thanks, I will wait....

MV

Pinturiccio
Devart Team
Posts: 2420
Joined: Wed 02 Nov 2011 09:44

Re: Problem with stored Procedure Example from Documentation

Post by Pinturiccio » Fri 30 Mar 2018 15:35

We have fixed the bug with an Oracle cursor returned by a stored procedure.

New build of dotConnect Universal 3.70.1612 is available for download now!
It can be downloaded from https://www.devart.com/dotconnect/unive ... nload.html (trial version) or from Customer Portal (for users with valid subscription only).
For more information, please refer to viewtopic.php?t=36973

Post Reply