Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: OCI and Stored Procedures

Re: OCI and Stored Procedures

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: 1997/07/01
Message-ID: <33b90c92.2216917@newshost>#1/1

On Tue, 01 Jul 1997 13:25:09 +0200, Stefan von Brauk <sbrauk_at_gwdg.de> wrote:

>Hi all,
>
>I have some problems calling a stored procedure with OCI like
>oexec("EXEC myProc(10)"); as result Oracle returns 900 (no SQL-command).
>Is there a way to call stored procedures?
>TIA
>
>Stefan von Brauk

exec is a SQL*Plus/Svrmgrl ism that simply wraps a begin and end; around the source. So:

SQL> exec myProc(10)

Becomes for all intents and purposes:

SQL> begin myProc(10); end;

   > /

It's just a shortcut.

In OCI, you would

oparse(&cda, "begin myProc(10); end;", -1, 0, 2 ); oexec( &cda );

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Bethesda MD

http://govt.us.oracle.com/ -- downloadable utilities



Opinions are mine and do not necessarily reflect those of Oracle Corporation Received on Tue Jul 01 1997 - 00:00:00 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US