Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 06, 2012 06:15 AM by Ajay2707
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.
Jul 22, 2010 11:22 AM|LINK
A fetch or describe was attempted before executing a statement handle. Plesse execute a statement and then fetch or describe the data.
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.
Aug 03, 2012 02:09 PM|LINK
If yes, please, help me!
Aug 03, 2012 04:22 PM|LINK
Did you install the latest ODP.NET drivers using the CLIENT INSTALLATION option
on the application server?
Aug 06, 2012 06:15 AM|LINK
You should not close after declare , there is step for cursor.
OPEN FETCH <process_data> CLOSEsee the example.
SET SERVEROUTPUT ON SIZE 1000000
INTO l_empno, l_ename;
EXIT WHEN l_cursor%NOTFOUND;
DBMS_OUTPUT.PUT_LINE(l_ename || ' | ' || l_empno);
The same problem you get in this link.