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: calling stored procedures using dynamic sql

Re: calling stored procedures using dynamic sql

From: <Solomon.Yakobson_at_entex.com>
Date: 1997/01/14
Message-ID: <853269780.13533@dejanews.com>#1/1

Stored procedures can be called only from PL/SQL. You need to wrap stored procedure call with BEGIN-END:

      strcpy (sqlcommand, "begin calldemo.test_proc end;");

Solomon.Yakobson_at_entex.com

In article <5besme$cks_at_aknews1.netlink.net.nz>,   akdh_at_ihug.co.nz (Andrew Holman) wrote:
>
> I want to call a stored procedure using proC and dynamic SQL. But I get
> the error "ORA-00900: invalid SQL statement" returned. Does anyone know if
> this is possible or do I have to use embedded SQL.
>
> I have tried calling a stored procedure which takes no parameters using
> method 1 i.e
>
> strcpy (sqlcommand, "calldemo.test_proc");
> EXEC SQL EXECUTE IMMEDIATE :sqlcommand;
>
> Also method 2 has been tried.
>
> Thanks
> Andrew Holman

-------------------==== Posted via Deja News ====-----------------------
      http://www.dejanews.com/     Search, Read, Post to Usenet
Received on Tue Jan 14 1997 - 00:00:00 CST

Original text of this message

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