Josh-CO Dev

Solving the worlds problems one line of code at a time.

ORA-24338: Statement Handle Not Executed

Leave a comment


I ran into some problems yesterday when I recompiled an application for the first time in a few months. I started getting an Oracle error stating: Statement handle not executed. Simple enough. My concern was that my database code had not changed since March, only my application code. This code is pretty complex anyway.

I have to fire off a thread that runs a big process that takes about 15 minutes and dumps the data into a table. Another thread then monitors the table and waits for the datadump to finish. After staring at my code for a while, I found this:

 PROCEDURE createReportingData (
pYear IN NUMBER,
pMonth IN NUMBER,
pDay IN NUMBER,
pUnitID IN VARCHAR2,
pGenerate IN NUMBER,
pDaily IN NUMBER)
presults OUT treturncursor)
IS
statusout INTEGER;
error_msg VARCHAR2(1000);
v_strSql VARCHAR2(4000);
v_strSql2 VARCHAR2(500);
BEGIN

The problem is the presults OUT treturncursor. My logic was expecting to output a cursor, which it used to do before the change in March. I simply commented out this line in the spec and body, and now everything works like a champ.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s