Page 1 of 1

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

Posted: Fri 15 Mar 2013 23:50
by Matt-man
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

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

Posted: Mon 18 Mar 2013 17:36
by Shalex
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.

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

Posted: Mon 18 Mar 2013 21:36
by Matt-man
Thanks for the information.

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

Posted: Tue 19 Mar 2013 09:04
by Shalex
JIC: comparison of Entity Developer and Entity Data Model Designer is available at http://www.devart.com/entitydeveloper/ed-vs-edm.html.

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

Posted: Wed 29 May 2013 09:25
by Shalex
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.

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

Posted: Thu 30 May 2013 14:45
by Shalex
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.