I have a oracle procedure that has only one parameter to it which is SYS_REFCURSOR AS OUT Direction. i am using System.Data.OracleClient namespace. my Command.Execut estatement is failing with following error message
ORA-24338: statement handle not executed
Please note i can not use ODP.net as Client does not want to install it. They want to use .net out of box namespace.
moonistahir
0 Points
5 Posts
ORA-24338: statement handle not executed --ASP.net C#
Jul 22, 2010 07:51 AM|LINK
I have a oracle procedure that has only one parameter to it which is SYS_REFCURSOR AS OUT Direction. i am using System.Data.OracleClient namespace. my Command.Execut estatement is failing with following error message
ORA-24338: statement handle not executed
Please note i can not use ODP.net as Client does not want to install it. They want to use .net out of box namespace.
mamun22s
Member
538 Points
136 Posts
Re: ORA-24338: statement handle not executed --ASP.net C#
Jul 22, 2010 11:22 AM|LINK
Dear moonistahir,
A fetch or describe was attempted before executing a statement handle. Plesse execute a statement and then fetch or describe the data.
Regards,
Senior Software Engineer
Ennovia Technologies Limited
(Mark it as answer if it does help you!)
moonistahir
0 Points
5 Posts
Re: ORA-24338: statement handle not executed --ASP.net C#
Jul 22, 2010 01:29 PM|LINK
can you provide an example of what is meant by execute and then fetch? Is it something you are talking abt in procedure or .net code.
Procedure last line is like
OPEN P_CURSOR FOR SELECT * FROM MYTABLE;
and in .NET i am calling the procedure using DataReader.Execute
What should i cahnge to make it working, Please help.
cleiton.marx
Member
4 Points
2 Posts
Re: ORA-24338: statement handle not executed --ASP.net C#
Aug 03, 2012 02:09 PM|LINK
Hello
, I am with the same problem. Do you've solved it?If yes, please, help me!
Regards!
Lannie
Contributor
3738 Points
728 Posts
Re: ORA-24338: statement handle not executed --ASP.net C#
Aug 03, 2012 04:22 PM|LINK
Did you install the latest ODP.NET drivers using the CLIENT INSTALLATION option
on the application server?
Ajay2707
Contributor
4483 Points
868 Posts
Re: ORA-24338: statement handle not executed --ASP.net C#
Aug 06, 2012 06:15 AM|LINK
Hi Cleiton,
You should not close after declare , there is step for cursor.
SET SERVEROUTPUT ON SIZE 1000000 DECLARE l_cursor test_refcursor_pkg.my_ref_cursor; l_ename emp.ename%TYPE; l_empno emp.empno%TYPE; BEGIN test_refcursor_pkg.test_proc (l_cursor); LOOP FETCH l_cursor INTO l_empno, l_ename; EXIT WHEN l_cursor%NOTFOUND; DBMS_OUTPUT.PUT_LINE(l_ename || ' | ' || l_empno); END LOOP; CLOSE l_cursor; END; /The same problem you get in this link.
https://kr.forums.oracle.com/forums/thread.jspa?threadID=1087048
https://forums.oracle.com/forums/thread.jspa?threadID=2394564&tstart=2