We just started working with the dotConnect for Oracle and are working with the Entity framework. One of our tasks is to call a few stored procedures which return ref_cursors, and I am having a problem only when using the DevArt Entity Developer v2.80.116.
Our Stored Procedure test is very simple:
CREATE OR REPLACE PROCEDURE GETDATASET(dataset OUT SYS_REFCURSOR) IS
BEGIN
OPEN dataset FOR
select * from mytable
END GETDATASET;
If I open a new web project, add a DevArt Entity Diagram, and drag the stored procedure from the database browser to the diagram, it creates a Complex Type with all my returned columns in it, and creates a method just as it should. Everything looks fine. However when I execute the method like so :
TestModel model = new TestModel();
var result = model.GetDataSet();
I get the following :
ORA-06550:line 2, column 3: PLS-00306:wrong number or types of arguments in call to 'GETDATASET'
If I click on the Stored proc under the Store in the model explorer, it tells me that the return type of this store proc is None. None of the checkboxes are checked, Result Set Parameter is blank, and there are no parameters in the parameters tab. Under the method it created there are also no parameters specified in the parameters tab. I tried checkin some of these and changing options around, but nothing helps.
Now the funny thing is, if I try using microsofts entity designer, and modify the XML it creates (Like your help file says) - it returns this just fine. I thought the whole reason for using your entity developer is so that things like this would work seamlessly - am I doing something wrong? Our test couldnt be simpler (Its right out of your REF CURSOR tutorial in the help file) - I am hoping maybe you can point me in the right direction?
Thank you!
Stored Procedure Parameter Error with REF_CURSOR
Please try the latest (5.70.140) version of dotConnect for Oracle. I cannot reproduce the problem with this version.
For more information about using REF CURSOR as out parameter, refer to our tutorial:
http://www.devart.com/dotconnect/oracle ... rsors.html.
Supplement to the mentioned tutorial.
The GET_DEPT_PROC() returns a collection of records from the DEPT table (you will find its DDL in the previous tuturial). So you need to add the Dept EntityClass to your model additionally to the GetDeptProc EntityMethod. Some interface and functionality was changed since this tutorial was created. E.g.: there is a Value Types list in Method Editor instead of Entities dropdown (as tutorial's screenshot illustrates), because we have added support for multi result sets.
For more information about using REF CURSOR as out parameter, refer to our tutorial:
http://www.devart.com/dotconnect/oracle ... rsors.html.
Supplement to the mentioned tutorial.
The GET_DEPT_PROC() returns a collection of records from the DEPT table (you will find its DDL in the previous tuturial). So you need to add the Dept EntityClass to your model additionally to the GetDeptProc EntityMethod. Some interface and functionality was changed since this tutorial was created. E.g.: there is a Value Types list in Method Editor instead of Entities dropdown (as tutorial's screenshot illustrates), because we have added support for multi result sets.