Stored Function problem in oracle

Discussion of open issues, suggestions and bugs regarding Entity Framework support in ADO.NET Data providers
Post Reply
sysman
Posts: 6
Joined: Fri 13 Oct 2017 19:33

Stored Function problem in oracle

Post by sysman » Fri 13 Oct 2017 19:46

Hi
I use oracle 12c and want call Stored Function that return scalar result (varchar2 oracle data type).
according "Stored Function with Scalar Result" in entity developer document I can implement method that mapped to special oracle function.
but when run my project in visual studio 2017 I got this error:

Code: Select all

{"ORA-06550: line 1, column 8:
PLS-00221: 'FNC_GET_NO' is not a procedure or is undefined
ORA-06550: line 1, column 8:
PL/SQL: Statement ignored"}	
System.Exception {Oracle.ManagedDataAccess.Client.OracleException}
I got error on method of function in this line

Code: Select all

result = (string)command.ExecuteScalar();

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

Re: Stored Function problem in oracle

Post by Shalex » Mon 16 Oct 2017 08:34

Please upload a test project with the corresponding DDL script to ftp://ftp.devart.com (credentials: anonymous / yourEmail) so that we can reproduce and investigate the issue in our environment.

sysman
Posts: 6
Joined: Fri 13 Oct 2017 19:33

Re: Stored Function problem in oracle

Post by sysman » Fri 20 Oct 2017 11:56

I'm uploded project into ftp with "OracleFunctionTest.rar" name.
Oracle script in inside sln file of project.
Thank you

sysman
Posts: 6
Joined: Fri 13 Oct 2017 19:33

Re: Stored Function problem in oracle

Post by sysman » Mon 23 Oct 2017 20:23

I'm using Entity Developer version 6.1.333

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

Re: Stored Function problem in oracle

Post by Shalex » Tue 24 Oct 2017 14:25

Thank you for the test project. We have reproduced the issue and are investigating it. We will notify you about the result.

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

Re: Stored Function problem in oracle

Post by Shalex » Tue 31 Oct 2017 19:32

ODP.NET doesn't support functions in Entity Framework, only stored procedures may be mapped.

Actually, Entity Framework itself doesn't support functions out of the box:
https://social.msdn.microsoft.com/Forum ... rk-40-edmx
https://forums.asp.net/t/2055038.aspx?s ... +framework

As a possible solution, please use dotConnect for Oracle Professional (instead of ODP.NET) which includes built-in settings to work around this EF limitation. JIC: dotConnect for Oracle Professional includes Entity Developer (so Entity Developer as a separate product is not necessary).

sysman
Posts: 6
Joined: Fri 13 Oct 2017 19:33

Re: Stored Function problem in oracle

Post by sysman » Sun 05 Nov 2017 04:30

Very thank you

Post Reply