Re: Is dbms_output.put_line invalid SQL statement??!!

From: Oliver Stratmann <ostratmann_at_zeb.de>
Date: Mon, 27 Jan 2003 19:20:36 +0100
Message-ID: <b13t9k$ukhjl$1_at_ID-180535.news.dfncis.de>


Hello Peter,

i think the problem is that a pl/sql-procedure-call is not pure sql (in oracle). you should embed the procedure-call in a begin-end-block. something like

"EXEC SQL CALL begin dbms_output.put_line('xxx'); end;"

might help.

bye!

oli

"Peter" <piterek9_at_poczta.onet.pl> schrieb im Newsbeitrag news:aaf8f6e6.0301161221.1935bb95_at_posting.google.com...
> Hi,
>
> I tried use my function (defined in a package) using EXEC SQL CALL
> in Pro*C (Ora 8.0.6 / 8.1.5)
> I always got "ORA-00900: invalid SQL statement".
>
> To check what is wrong I tried to use well-known procedure:
>
> EXEC SQL CALL dbms_output.put_line('xxx');
>
> or
>
> strcpy(ptn,"xxx");
> EXEC SQL CALL dbms_output.put_line(:ptn);
>
> Results were the same - ORA-00900.
>
> Everything is correct according to Pro*C documentation.
> I compiled it with check=semnatics and connecting to database
> during compilation (userid).
>
> It seems that all function names after "CALL" are refused.
> DBMS_OUTPUT.PUT_LINE procedure also!
> Do you know what is wrong?
>
> Thanks in advance,
> Peter
Received on Mon Jan 27 2003 - 19:20:36 CET

Original text of this message