Orcacle call function error

Discussion of open issues, suggestions and bugs regarding Entity Developer - ORM modeling and code generation tool
Post Reply
sysman
Posts: 6
Joined: Fri 13 Oct 2017 19:33

Orcacle call function error

Post by sysman » Fri 27 Oct 2017 04:34

Hi
I want to call an oracle function from entity developer.
I wrote this command in "command text" property:

Code: Select all

SELECT FNC_SUM(1,2) 
FROM DUAL
but in running time I got this error:

Code: Select all

System.InvalidCastException: 'Invalid cast from 'System.Decimal' to 'System.Data.Metadata.Edm.PrimitiveType'.'
in model designer code:

Code: Select all

result = (global::System.Nullable<int>)command.ExecuteScalar();
how to solve this?

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

Re: Orcacle call function error

Post by Shalex » Wed 01 Nov 2017 13:36

Please set Return Type = Decimal in CSDL of *.edml via interface of Entity Developer to generate:

Code: Select all

result = (global::System.Nullable<decimal>)command.ExecuteScalar();
After this, the code should work.

Post Reply