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
Error when trying to add stored procedures to ADO.net Entity Model
Re: Error when trying to add stored procedures to ADO.net Entity Model
This is a known problem with EDM Wizard/Desinger (it does not create complex type for return result set). We are investigating the issue.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.'.
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.
You can use plain ADO.NET instead of Entity Framework model: http://www.devart.com/dotconnect/oracle ... ursor.html.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.
Re: Error when trying to add stored procedures to ADO.net Entity Model
Thanks for the information.
Re: Error when trying to add stored procedures to ADO.net Entity Model
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
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
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.
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.