Re: ORA 1003 - No Statement Parsed error

From: Jim Smith <jim_at_jimsmith.demon.co.uk>
Date: 1996/01/12
Message-ID: <aVtWvDAlzo9wEwzG_at_jimsmith.demon.co.uk>#1/1


In article <4d1h3c$1s1_at_leto.pcc.edu>, Howard Thompson <hthompso_at_pcc.edu> writes
>I'm having a bummer. I've got a Pro*C program that is producing an
>ORA-1003 error (no statement parsed) and I cannot figure out why.
>

 <SNIP>
> V_MainSlctStmt.len = sprintf(V_MainSlctStmt.arr,

                  ^^^

Shouldn't this be .arr?
You may also need to set the length, eg V_MainSlctStmt.len=strlen(...

> EXEC SQL PREPARE MainSlctS FROM :V_MainSlctStmt;
> EXEC SQL DECLARE MainSlctC CURSOR FOR MainSlctS;
> EXEC SQL OPEN MainSlctC;
>
> EXEC SQL WHENEVER NOTFOUND DO break;
> EXEC SQL WHENEVER SQLERROR DO vf_SqlError();
I think these WHENEVERs will only take effect from here on, so you may be missing errors on your prepare,declare or open statements.

-- 
Jim Smith
Oracle DBA
Received on Fri Jan 12 1996 - 00:00:00 CET

Original text of this message