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
Error in stored procs with EF 4
-
- Posts: 14
- Joined: Thu 28 Jan 2010 17:13
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
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
-
- Posts: 14
- Joined: Thu 28 Jan 2010 17:13
-
- Posts: 14
- Joined: Thu 28 Jan 2010 17:13
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.
"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.
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.
If this doesn't help, please send us a small test project with the corresponding script of the database objects.