Error in stored procs with EF 4

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
ramana.bhavaraju
Posts: 14
Joined: Thu 28 Jan 2010 17:13

Error in stored procs with EF 4

Post by ramana.bhavaraju » Sun 14 Mar 2010 14:48

Hi,

We were using EF version 1 with dotconnect for oracle . We moved to VS 2010 RC and have our model project targeting .net framework 3.5. Everything was working. Once we moved our model project to 4.0 and changed our edmx to EF4 and installed the latest devart 5.60.102... the stored procedure calls are giving an error saying
"The type of key field ObjectId is expected to be of type Int64, but the value provided is of type decimal"... I dont get this error is i revert it back to .net framework 3.5. Please let me know what is happening here

Thanks,
Ramana

ramana.bhavaraju
Posts: 14
Joined: Thu 28 Jan 2010 17:13

Post by ramana.bhavaraju » Mon 15 Mar 2010 15:31

Hi,

I found the problem to the issue but still not sure how it worked till now. So please let me know if something changed in devart with this new release. Previously the ObjectId(our primary key) is of type Int64 in the edmx and of type number(19,0) in the oracle database. Devart magically figured this out when running the stored procs and did the conversion without complaining. But now it blows up. PLease let me know why this is happening as we cannot make the ObjectId as a decimal in the edmx and it should be as Int64.

Thanks
Ramana

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Mon 15 Mar 2010 16:00

Could you please send me (support * devart * com, subject "EF4: SP Type mismatch") the scripts of the objects causing the problem?
I'm unable to reproduce it.

ramana.bhavaraju
Posts: 14
Joined: Thu 28 Jan 2010 17:13

Post by ramana.bhavaraju » Mon 15 Mar 2010 16:17

Sent the email with the edmx...i did not send the sql script..because it is too big with all our tables and stored procs..

ramana.bhavaraju
Posts: 14
Joined: Thu 28 Jan 2010 17:13

Post by ramana.bhavaraju » Tue 16 Mar 2010 17:40

Any luck with my issue..this is a show stopper for us...please let me know whats happening. When we changed all the Primary keys and foriegn keys in my edmx to decimal ...it works..

Thanks
Ramana

Anchor
Posts: 31
Joined: Mon 08 Dec 2008 21:02
Location: Massachustts/USA

Post by Anchor » Thu 25 Aug 2011 18:20

Has there been any luck on this? I think I have a similar problem? I am trying to get an entity back from a stored procedure but I get this error...

"The type of the key field 'USER_ID' is expected to be 'System.Int64', but the value provided is actually of type 'System.String'"

It seems like the my database table does not match up with my entity, like the stored procedure is trying to take data from the Address field in the DB table and stuff it into the UserID field in the entity.

It's gotta be either going from the .NET 3.5 to 4.0 or from devart dotConnect for Oracle 5.1 to 6.3 that is causing the problem.

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

Post by Shalex » Wed 31 Aug 2011 12:22

As we understood, you are using stored procedure that returns result set via cursor. Are you working with EDMX? Try setting explicit mapping of column names, which are returned in cursor, to properties of entity/ComplexType, cursor is mapped to: select necessary Function Import, set Mapping Details in the window. This functionality was implemented in EFv4.

If this doesn't help, please send us a small test project with the corresponding script of the database objects.

Post Reply