Error when trying to add stored procedures to ADO.net Entity Model

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
Matt-man
Posts: 2
Joined: Fri 15 Mar 2013 23:37

Error when trying to add stored procedures to ADO.net Entity Model

Post by Matt-man » Fri 15 Mar 2013 23:50

Hi,

I am trying to build a simple ADO.net entity model with one table and two stored procedures so that I can build an application that pulls data out of the stored procs and puts some of it in the table. I've been able to create the model from the database and add the table, but I am having trouble adding the stored procedures.

I open up the .edmx file and do Update from Database. I select a stored procedure and click Finish, it crunches for a second and brings up the window where I can specify the parameter values for the proc. When I hit Execute I get the following error:

An exception of the type 'System.TypeLoadException' occurred while attempting to update from the database. The exception message is: 'Failure has occurred while loading a type.'.

Any suggestions would be appreciated. Alternately, if there's a way to access the stored procs and the data they return without adding them to the model, that's fine too.

I am running Visual Studio 2012 with Update 1, dotConnect for Oracle version 7.6.202 (trial version, if that matters), and Windows 7 x64. The database is Oracle 10g (10.1.0.5.0).

Thanks,

Matt

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Error when trying to add stored procedures to ADO.net Entity Model

Post by Shalex » Mon 18 Mar 2013 17:36

Matt-man wrote:An exception of the type 'System.TypeLoadException' occurred while attempting to update from the database. The exception message is: 'Failure has occurred while loading a type.'.
This is a known problem with EDM Wizard/Desinger (it does not create complex type for return result set). We are investigating the issue.

As a workaround, try using Entity Developer (*.edml, the Devart Entity Model item) which is our ORM tool for creating/editing models, it has a lot of improvements comparing to EDM Wizard (*.edmx, the ADO.NET Entity Data Model item). You can also convert *.edmx to *.edml with Entity Developer.
Matt-man wrote:Alternately, if there's a way to access the stored procs and the data they return without adding them to the model, that's fine too.
You can use plain ADO.NET instead of Entity Framework model: http://www.devart.com/dotconnect/oracle ... ursor.html.

Matt-man
Posts: 2
Joined: Fri 15 Mar 2013 23:37

Re: Error when trying to add stored procedures to ADO.net Entity Model

Post by Matt-man » Mon 18 Mar 2013 21:36

Thanks for the information.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Error when trying to add stored procedures to ADO.net Entity Model

Post by Shalex » Tue 19 Mar 2013 09:04

JIC: comparison of Entity Developer and Entity Data Model Designer is available at http://www.devart.com/entitydeveloper/ed-vs-edm.html.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Error when trying to add stored procedures to ADO.net Entity Model

Post by Shalex » Wed 29 May 2013 09:25

The complex type generation for a return result set of a stored procedure is supported in EDM Wizard / Designer. We will post here when the corresponding build of dotConnect for Oracle is available for download.

Shalex
Site Admin
Posts: 9543
Joined: Thu 14 Aug 2008 12:44

Re: Error when trying to add stored procedures to ADO.net Entity Model

Post by Shalex » Thu 30 May 2013 14:45

New build of dotConnect for Oracle 7.7.252 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=27239.

Post Reply