oracle stored procedure with out ref cursor and out param

Discussion of open issues, suggestions and bugs regarding ADO.NET provider for Oracle
Post Reply
smuddasu
Posts: 9
Joined: Wed 16 Sep 2009 19:53

oracle stored procedure with out ref cursor and out param

Post by smuddasu » Mon 22 Jul 2013 13:44

hi,
i am planning to upgrade to dotConnect 7.7 and EntityDeveloper tool 5.5. so I'm trying a POC for calling a oracle stored procedure with an out ref cursor and out param with the latest tools. I'm getting an exception that ORA exception. If i don't have any out params, its working fine.
I'm attaching the POC files to this.
Attached zip file contains
devartpoc\EDModel\createdb.sql to create the tables and oracle package.
devartpoc\EDModel\createdata.sql to insert data into the 2 tables.
devartpoc\EDModel folder has the csdl, msl and ssdl files.
\devartpoc\DevartOracleCallingSP is the .net 4.0 console application to call the stored procedure.

Thanks for your help.

smuddasu
Posts: 9
Joined: Wed 16 Sep 2009 19:53

Re: oracle stored procedure with out ref cursor and out param

Post by smuddasu » Tue 23 Jul 2013 15:40

devart, any help with this issue is greatly appreciated. i already sent the code to [email protected]

Thanks again

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

Re: oracle stored procedure with out ref cursor and out param

Post by Shalex » Wed 24 Jul 2013 13:13

smuddasu wrote:ORA-06550: line 2, column 3:
PLS-00306: wrong number or types of arguments in call to 'P_GET_CONTACT'
To debug this and similar issues, please turn on the dbMonitor tool for tracing database activity when developing application:
http://www.devart.com/dotconnect/oracle ... nitor.html
http://www.devart.com/dbmonitor/dbmon3.exe

dbMonitor shows that O_RESULT_SET parameter is the last in the signature of stored procedure call (because it is a hidden parameter, see the generated DevartPOCSP.ssdl). But its position is different in the stored procedure definition (in database).

As a solution, please set the Pass Parameters By Name connection string option to True (via Connection Properties > Advanced window in Database Explorer of Entity Developer). This setting is applied for the stored procedure calls. Save the model, regenerate code and metadata files.

smuddasu
Posts: 9
Joined: Wed 16 Sep 2009 19:53

Re: oracle stored procedure with out ref cursor and out param

Post by smuddasu » Wed 07 Aug 2013 15:00

Thanks a lot for your help. That did it.

Post Reply