Using stored procedure in LinqConnect DataContext

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
JamesL
Posts: 1
Joined: Mon 04 Jun 2012 11:35

Using stored procedure in LinqConnect DataContext

Post by JamesL » Mon 04 Jun 2012 12:37

Hi I am trying to evaluate dotConnect for Oracle and have a question about calling stored procedures from the dbcontext.

I have created a LinqConnect DataContext (.lqml) file from my oracle db and included a table and a couple of stored procedures in the model.

when I call one of the stored procedures from the db context

public List<GETALLPUBDATEResult> GetDbAllPubDates()
{
MDPDataContext db = new MDPDataContext();
List<GETALLPUBDATEResult> pubDatesArray;
var pubDates = db.GETALLPUBDATE();
pubDatesArray = pubDates.ToList<GETALLPUBDATEResult>();
return pubDatesArray;
}
I get the following error in the stored procedure:
PLS-00306: wrong number or types of arguments in call to 'GETALLPUBDATES'

I know it is something to do with the REF_CURSOR (which is the only parameter in the stored Procedure) that should be returned from the SP.

This is the code that is created in the DataContext1.Designer.cs file

[Function(Name=@"MDP.GETALLPUBDATES")]
public Devart.Data.Linq.ISingleResult<GETALLPUBDATEResult> GETALLPUBDATE()
{
IExecuteResult _GETALLPUBDATEResult = this.ExecuteMethodCall(this, ((MethodInfo)(MethodInfo.GetCurrentMethod())));
return ((Devart.Data.Linq.ISingleResult<GETALLPUBDATEResult>)(_GETALLPUBDATEResult.ReturnValue));
}

Can you please let me know if there is something I have failed to do? In the Model Explorer pane the method 'GETALLPUBDATE()' has no input parameters? and the return type is 'Value Types' GETALLPUBDATEResult.


many thanks
James

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Re: Using stored procedure in LinqConnect DataContext

Post by StanislavK » Thu 07 Jun 2012 11:17

Thank you for the report. There is an issue with handling cursor parameters of stored procedures, and we are currently working on it. We will post here as soon as this problem is fixed.

enigma51
Posts: 18
Joined: Thu 02 Dec 2010 18:55

Re: Using stored procedure in LinqConnect DataContext

Post by enigma51 » Thu 12 Jul 2012 20:43

Any news on a fix for this. Its urgent as we have a project that is going live and this holding us up.

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Using stored procedure in LinqConnect DataContext

Post by MariiaI » Fri 13 Jul 2012 07:24

We have fixed the issue with handling cursor parameters of stored procedures. The corresponding build of dotConnect for Oracle will be available next week.

enigma51
Posts: 18
Joined: Thu 02 Dec 2010 18:55

Re: Using stored procedure in LinqConnect DataContext

Post by enigma51 » Tue 17 Jul 2012 20:33

Any specific date on this release?

MariiaI
Devart Team
Posts: 1472
Joined: Mon 13 Feb 2012 08:17

Re: Using stored procedure in LinqConnect DataContext

Post by MariiaI » Thu 19 Jul 2012 07:22

New build of dotConnect for Oracle 7.1.40 is available for download now!
It can be downloaded from http://www.devart.com/dotconnect/oracle/download.html (trial version) or from Registered Users' Area (for users with active subscription only).
For more information, please refer to http://forums.devart.com/viewtopic.php?f=1&t=24522

Post Reply